Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 1 | " plain TeX filetype plugin |
| 2 | " Language: plain TeX (ft=plaintex) |
| 3 | " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org> |
| 4 | " Version: 1.0 |
| 5 | " Last Change: Wed 22 Mar 2006 09:36:32 AM EST |
| 6 | |
| 7 | " Only do this when not done yet for this buffer. |
| 8 | if exists("b:did_ftplugin") |
| 9 | finish |
| 10 | endif |
| 11 | |
| 12 | " Don't load another plugin for this buffer. |
| 13 | let b:did_ftplugin = 1 |
| 14 | |
| 15 | " Avoid problems if running in 'compatible' mode. |
| 16 | let s:save_cpo = &cpo |
| 17 | set cpo&vim |
| 18 | |
| 19 | " Set 'comments' to format dashed lists in comments |
| 20 | setlocal com=sO:%\ -,mO:%\ \ ,eO:%%,:% |
| 21 | |
| 22 | " Set 'commentstring' to recognize the % comment character: |
| 23 | " (Thanks to Ajit Thakkar.) |
| 24 | setlocal cms=%%s |
| 25 | |
| 26 | " Allow "[d" to be used to find a macro definition: |
| 27 | let &l:define='\\\([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\=' |
| 28 | \ . 'def\|\\font\|\\\(future\)\=let' |
| 29 | \ . '\|\\new\(count\|dimen\|skip\|muskip\|box\|toks\|read\|write' |
| 30 | \ . '\|fam\|insert\)' |
| 31 | |
| 32 | " Tell Vim to recognize \input bar : |
| 33 | let &l:include = '\\input' |
| 34 | setlocal suffixesadd=.tex |
| 35 | |
| 36 | " The following lines enable the macros/matchit.vim plugin for |
| 37 | " extended matching with the % key. |
| 38 | " There is no default meaning for \(...\) etc., but many users define one. |
| 39 | if exists("loaded_matchit") |
| 40 | let b:match_ignorecase = 0 |
| 41 | \ | let b:match_skip = 'r:\\\@<!\%(\\\\\)*%' |
| 42 | \ | let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],' . |
| 43 | \ '\\begin\s*\({\a\+\*\=}\):\\end\s*\1' |
| 44 | endif " exists("loaded_matchit") |
| 45 | |
| 46 | let &cpo = s:save_cpo |
| 47 | |
| 48 | " vim:sts=2:sw=2: |