blob: 71049df6bdd3fd7303ee637fe477b0e5906f11fc [file] [log] [blame]
Bram Moolenaar8424a622006-04-19 21:23:36 +00001" filetype plugin for TeX and variants
2" Language: TeX (ft=initex)
3" Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org>
4" Version: 1.0
5" Last Change: Wed 19 Apr 2006
Riley Bruins0a083062024-06-03 20:40:45 +02006" Last Change: Thu 23 May 2024 by Riley Bruins <ribru17@gmail.com> ('commentstring')
Bram Moolenaar8424a622006-04-19 21:23:36 +00007
8" Only do this when not done yet for this buffer.
9if exists("b:did_ftplugin")
10 finish
11endif
12
13" Don't load another plugin for this buffer.
14let b:did_ftplugin = 1
15
16" Avoid problems if running in 'compatible' mode.
17let s:save_cpo = &cpo
18set cpo&vim
19
20let b:undo_ftplugin = "setl com< cms< define< include< sua<"
21
22" Set 'comments' to format dashed lists in comments
23setlocal com=sO:%\ -,mO:%\ \ ,eO:%%,:%
24
25" Set 'commentstring' to recognize the % comment character:
26" (Thanks to Ajit Thakkar.)
Riley Bruins0a083062024-06-03 20:40:45 +020027setlocal cms=%\ %s
Bram Moolenaar8424a622006-04-19 21:23:36 +000028
29" Allow "[d" to be used to find a macro definition:
30let &l:define='\\\([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\='
31 \ . 'def\|\\font\|\\\(future\)\=let'
32
33" Tell Vim to recognize \input bar :
34let &l:include = '\\input'
35setlocal suffixesadd=.tex
36
37let &cpo = s:save_cpo
Bram Moolenaar84f72352012-03-11 15:57:40 +010038unlet s:save_cpo
Bram Moolenaar8424a622006-04-19 21:23:36 +000039
40" vim:sts=2:sw=2: