blob: 9e0e402680fc20fbf69f626f1d3b754be8e458e1 [file] [log] [blame]
Bram Moolenaarc01140a2006-03-24 22:21:52 +00001" plain TeX filetype plugin
2" Language: plain TeX (ft=plaintex)
3" Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org>
Bram Moolenaar8424a622006-04-19 21:23:36 +00004" Version: 1.1
5" Last Change: Wed 19 Apr 2006
Bram Moolenaarc01140a2006-03-24 22:21:52 +00006
7" Only do this when not done yet for this buffer.
8if exists("b:did_ftplugin")
9 finish
10endif
11
Bram Moolenaar8424a622006-04-19 21:23:36 +000012" Start with initex. This will also define b:did_ftplugin and b:undo_ftplugin .
13source $VIMRUNTIME/ftplugin/initex.vim
Bram Moolenaarc01140a2006-03-24 22:21:52 +000014
15" Avoid problems if running in 'compatible' mode.
16let s:save_cpo = &cpo
17set cpo&vim
18
Bram Moolenaar8424a622006-04-19 21:23:36 +000019let b:undo_ftplugin .= "| unlet! b:match_ignorecase b:match_skip b:match_words"
Bram Moolenaarc01140a2006-03-24 22:21:52 +000020
21" Allow "[d" to be used to find a macro definition:
Bram Moolenaar8424a622006-04-19 21:23:36 +000022let &l:define .= '\|\\new\(count\|dimen\|skip\|muskip\|box\|toks\|read\|write'
Bram Moolenaarc01140a2006-03-24 22:21:52 +000023 \ . '\|fam\|insert\)'
24
Bram Moolenaarc01140a2006-03-24 22:21:52 +000025" The following lines enable the macros/matchit.vim plugin for
26" extended matching with the % key.
27" There is no default meaning for \(...\) etc., but many users define one.
28if exists("loaded_matchit")
29 let b:match_ignorecase = 0
30 \ | let b:match_skip = 'r:\\\@<!\%(\\\\\)*%'
Bram Moolenaar8424a622006-04-19 21:23:36 +000031 \ | let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],\\{:\\}'
Bram Moolenaarc01140a2006-03-24 22:21:52 +000032endif " exists("loaded_matchit")
33
34let &cpo = s:save_cpo
Bram Moolenaar84f72352012-03-11 15:57:40 +010035unlet s:save_cpo
Bram Moolenaarc01140a2006-03-24 22:21:52 +000036
37" vim:sts=2:sw=2: