Bug#384479: better recognising of tex vs plaintex filetype

martin f krafft madduck at debian.org
Thu Aug 24 15:07:44 UTC 2006

Package: vim
Version: 1:7.0-035+1
Severity: wishlist
Tags: patch

Please consider this patch. Rationale: larger documents are often
split into multiple files, which start with \chapter or \part or
\section. Right now, these are classified as plaintex, which
prevents, e.g. latexsuite from working.

I don't know TeX, but from what I found, these keywords seem to be
latex keywords.

--- /tmp/filetype.vim 2006-08-24 16:03:50.000000000 +0100
+++ filetype.vim  2006-08-24 16:04:47.000000000 +0100
@@ -1769,7 +1769,7 @@
     call cursor(1,1)
     let firstNC = search('^\s*[^[:space:]%]', 'c', 1000)
     if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword.
-      let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>'
+      let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\|part\>\|chapter\>\|section\>'
       let 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\>'
       let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)',
            \ 'cnp', firstNC + 1000)

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (750, 'unstable'), (500, 'testing'), (250, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17-2-686
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages vim depends on:
ii  libc6                        2.3.6.ds1-2 GNU C Library: Shared libraries
ii  libgpmg1                     1.19.6-22   General Purpose Mouse - shared lib
ii  libncurses5                  5.5-2       Shared libraries for terminal hand
ii  vim-common                   1:7.0-035+1 Vi IMproved - Common files
ii  vim-runtime                  1:7.0-035+1 Vi IMproved - Runtime files

vim recommends no packages.

-- no debconf information

 .''`.     martin f. krafft <madduck at debian.org>
: :'  :    proud Debian developer, author, administrator, and user
`. `'`     http://people.debian.org/~madduck http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20060824/ccc49f5b/attachment.pgp

More information about the pkg-vim-maintainers mailing list