summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
blob: 2d703d1308410a3cd5cd0a509ec3213b179c86f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Stefano Zacchiroli <zack@debian.org>
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 <jamessan@debian.org>
---
 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)