plaintex.vim 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. " plain TeX filetype plugin
  2. " Language: plain TeX (ft=plaintex)
  3. " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org>
  4. " Version: 1.1
  5. " Last Change: Wed 19 Apr 2006
  6. " Only do this when not done yet for this buffer.
  7. if exists("b:did_ftplugin")
  8. finish
  9. endif
  10. " Start with initex. This will also define b:did_ftplugin and b:undo_ftplugin .
  11. source $VIMRUNTIME/ftplugin/initex.vim
  12. " Avoid problems if running in 'compatible' mode.
  13. let s:save_cpo = &cpo
  14. set cpo&vim
  15. let b:undo_ftplugin .= "| unlet! b:match_ignorecase b:match_skip b:match_words"
  16. " Allow "[d" to be used to find a macro definition:
  17. let &l:define .= '\|\\new\(count\|dimen\|skip\|muskip\|box\|toks\|read\|write'
  18. \ . '\|fam\|insert\)'
  19. " The following lines enable the matchit.vim plugin for
  20. " extended matching with the % key.
  21. " There is no default meaning for \(...\) etc., but many users define one.
  22. if exists("loaded_matchit")
  23. let b:match_ignorecase = 0
  24. \ | let b:match_skip = 'r:\\\@<!\%(\\\\\)*%'
  25. \ | let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],\\{:\\}'
  26. endif " exists("loaded_matchit")
  27. let &cpo = s:save_cpo
  28. unlet s:save_cpo
  29. " vim:sts=2:sw=2: