From: Stefano Zacchiroli Date: Fri, 25 Aug 2006 13:33:04 +0200 Subject: Add recognition of more LaTeX commands for tex filetype detection Since filetype detection of TeX files defaults to plaintex, we've added detection of some additional LaTeX commands to help sway the detection to LaTeX. Closes: #384479 Signed-off-by: James McCoy --- runtime/autoload/dist/ft.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index bfc325d..7d1e15f 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -935,7 +935,7 @@ export def FTtex() var firstNC = search('^\s*[^[:space:]%]', 'c', 1000) if firstNC > 0 # Check the next thousand lines for a LaTeX or ConTeXt keyword. - var lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>' + var lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\|renewcommand\>\|part\>\|chapter\>\|section\>\|subsection\>\|subsubsection\>\|paragraph\>\|subparagraph\>\|subsubparagraph' var cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>' var kwline = search('^\s*\\\%(' .. lpat .. '\)\|^\s*\\\(' .. cpat .. '\)', 'cnp', firstNC + 1000)