" **userfun.vim** " " Generate a syntax file for highlighting your own functions. " " MAPS: " " ,,s Update the syntax file ~/mysyntaxfile.vim for the function! s " occurring in the current .vim file. " ----------------------------------------------------------------------------- map ,,s :call SynFileUpdate() " ----------------------------------------------------------------------------- if !exists("_userfun_vim_sourced") let _userfun_vim_sourced=1 " ----------------------------------------------------------------------------- so ~\buffun.vim so ~\fun.vim so ~\strfun.vim so ~\txtfun.vim let synfile="~/mysynfile.vim" au bufenter *.vim,_vimrc* execute "so ".synfile hi VimUserfuns guifg=darkblue gui=NONE cterm=NONE ctermfg=darkcyan hi link VimUserfun VimUserfuns " Syntax files for current file map ,,h :call SynUserFunHi() map ,,H :call SynUserFunHiUpdate() " Return an array with commands for highlighting the " userfuncions of the current .vim file function! SynUserFuns() let ol=line(".") let oc=col(".") let syncoms="" let i=1 wh i