Merge branch 'feat/tagfunc'
[vim_extended.git] / runtime / ftplugin / mp.vim
blob316fa9bb647e6cb63008664c775b0e66ac5b8042
1 " Vim filetype plugin file
2 " Language:         MetaPost
3 " Maintainer:       Nikolai Weibull <now@bitwi.se>
4 " Latest Revision:  2008-07-09
6 if exists("b:did_ftplugin")
7   finish
8 endif
9 let b:did_ftplugin = 1
11 let s:cpo_save = &cpo
12 set cpo&vim
14 let b:undo_ftplugin = "setl com< cms< fo<"
16 setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql
18 if exists(":FixBeginfigs") != 2
19   command -nargs=0 FixBeginfigs call s:fix_beginfigs()
21   function! s:fix_beginfigs()
22     let i = 1
23     g/^beginfig(\d*);$/s//\='beginfig('.i.');'/ | let i = i + 1
24   endfunction
25 endif
27 let &cpo = s:cpo_save
28 unlet s:cpo_save