Mercurial > vim
diff runtime/syntax/vim.vim @ 3920:c53344bacabf
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 15 Nov 2012 21:28:22 +0100 |
parents | 11d40fc82f11 |
children | fa4089df54bc |
line wrap: on
line diff
--- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 7.3 script -" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Jan 11, 2012 -" Version: 7.3-13 +" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Nov 14, 2012 +" Version: 7.3-20 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -76,7 +76,7 @@ syn case match " Function Names {{{2 syn keyword vimFuncName contained abs append argv atan2 bufexists bufname byte2line ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert items len line localtime map match matchdelete matchstr min mode nextnonblank pathshorten prevnonblank pumvisible readfile reltimestr remote_foreground remote_read remove repeat reverse search searchpair searchpos serverlist setcmdpos setloclist setpos setreg settabwinvar shellescape sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol winbufnr winheight winnr winrestview winwidth syn keyword vimFuncName contained acos argc asin browse buflisted bufnr byteidx changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave isdirectory join libcall line2byte log maparg matchadd matchend max mkdir mzeval nr2char pow printf range reltime remote_expr remote_peek remote_send rename resolve round searchdecl searchpairpos server2client setbufvar setline setmatches setqflist settabvar setwinvar simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode wincol winline winrestcmd winsaveview writefile -syn keyword vimFuncName contained add argidx atan browsedir bufloaded bufwinnr call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret islocked keys libcallnr lispindent log10 mapcheck matcharg matchlist pyeval py3eval luaeval +syn keyword vimFuncName contained add argidx atan browsedir bufloaded bufwinnr call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret islocked keys libcallnr lispindent log10 mapcheck matcharg matchlist "--- syntax above generated by mkvimvim --- " Special Vim Highlighting (not automatic) {{{1 @@ -149,11 +149,12 @@ syn keyword vimAugroupKey contained aug[ " Operators: {{{2 " ========= +" COMBAK: vimOperParen used to have "oneline" syn cluster vimOperGroup contains=vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile -syn region vimOperParen oneline matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup -syn region vimOperParen oneline matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar +syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup +syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") syn match vimOperError ")" endif @@ -203,7 +204,7 @@ if !exists("g:vimsyn_noerror") && !exist endif syn case ignore syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister] -syn keyword vimUserAttrbCmplt contained augroup buffer command dir environment event expression file function help highlight mapping menu option shellcmd something tag tag_listfiles var +syn keyword vimUserAttrbCmplt contained augroup buffer color command compiler cscope dir environment event expression file file_in_path filetype function help highlight locale mapping menu option shellcmd sign syntax tag tag_listfiles var syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\u\w*\)\+\|\u\w*\)"hs=s+1 nextgroup=vimUserCmdError @@ -328,7 +329,7 @@ syn match vimMapLhs contained "\S\+" c syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend -syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue +syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimNotation,vimCtrlChar,vimContinue skipnl nextgroup=vimMapRhsExtend syn case ignore syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique syn case match @@ -360,8 +361,8 @@ syn case match " User Function Highlighting {{{2 " (following Gautam Iyer's suggestion) " ========================== -syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute -syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation +syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute +syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" " Errors And Warnings: {{{2 @@ -429,7 +430,7 @@ syn keyword vimSynType contained match s syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" if has("conceal") - syn match vimSynMtchOpt contained "\<cchar=" nextgroup=VimSynMtchCchar + syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar syn match vimSynMtchCchar contained "\S" endif syn cluster vimFuncBodyList add=vimSynMtchGroup @@ -510,17 +511,18 @@ endif syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList -syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError +syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib syn match vimHiTermcap contained "\S\+" contains=vimNotation +syn match vimHiNmbr contained '\d\+' " Highlight: clear {{{2 syn keyword vimHiClear contained clear nextgroup=vimHiGroup " Highlight: link {{{2 -syn region vimHiLink contained oneline matchgroup=vimCommand start="\<\(def\%[ault]\s\+\)\=link\>\|\<def\>" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation +syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation syn cluster vimFuncBodyList add=vimHiLink " Control Characters {{{2 @@ -562,7 +564,12 @@ endif " [-- lua --] {{{3 let s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim") if !filereadable(s:luapath) - let s:luapath= fnameescape(globpath(&rtp,"syntax/lua.vim")) + for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n") + if filereadable(fnameescape(s:luapath)) + let s:luapath= fnameescape(s:luapath) + break + endif + endfor endif if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath) unlet! b:current_syntax @@ -584,7 +591,12 @@ unlet s:luapath " [-- perl --] {{{3 let s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim") if !filereadable(s:perlpath) - let s:perlpath= fnameescape(globpath(&rtp,"syntax/perl.vim")) + for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n") + if filereadable(fnameescape(s:perlpath)) + let s:perlpath= fnameescape(s:perlpath) + break + endif + endfor endif if (g:vimsyn_embed =~ 'p' && has("perl")) && filereadable(s:perlpath) unlet! b:current_syntax @@ -606,7 +618,12 @@ unlet s:perlpath " [-- ruby --] {{{3 let s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim") if !filereadable(s:rubypath) - let s:rubypath= fnameescape(globpath(&rtp,"syntax/ruby.vim")) + for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n") + if filereadable(fnameescape(s:rubypath)) + let s:rubypath= fnameescape(s:rubypath) + break + endif + endfor endif if (g:vimsyn_embed =~ 'r' && has("ruby")) && filereadable(s:rubypath) unlet! b:current_syntax @@ -627,9 +644,14 @@ unlet s:rubypath " [-- python --] {{{3 let s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim") if !filereadable(s:pythonpath) - let s:pythonpath= fnameescape(globpath(&rtp,"syntax/python.vim")) + for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n") + if filereadable(fnameescape(s:pythonpath)) + let s:pythonpath= fnameescape(s:pythonpath) + break + endif + endfor endif -if (g:vimsyn_embed =~ 'P' && has("python")) && filereadable(s:pythonpath) +if g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath) unlet! b:current_syntax exe "syn include @vimPythonScript ".s:pythonpath if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'P' @@ -656,7 +678,12 @@ endif if s:trytcl let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim") if !filereadable(s:tclpath) - let s:tclpath= fnameescape(globpath(&rtp,"syntax/tcl.vim")) + for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n") + if filereadable(fnameescape(s:tclpath)) + let s:tclpath= fnameescape(s:tclpath) + break + endif + endfor endif if (g:vimsyn_embed =~ 't' && has("tcl")) && filereadable(s:tclpath) unlet! b:current_syntax @@ -683,7 +710,12 @@ unlet s:trytcl " [-- mzscheme --] {{{3 let s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim") if !filereadable(s:mzschemepath) - let s:mzschemepath= fnameescape(globpath(&rtp,"syntax/scheme.vim")) + for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n") + if filereadable(fnameescape(s:mzschemepath)) + let s:mzschemepath= fnameescape(s:mzschemepath) + break + endif + endfor endif if (g:vimsyn_embed =~ 'm' && has("mzscheme")) && filereadable(s:mzschemepath) unlet! b:current_syntax @@ -879,6 +911,7 @@ hi def link vimUserCmdError Error hi def link vimUserFunc Normal hi def link vimVar Identifier hi def link vimWarn WarningMsg +hi def link vimHiNmbr Number " Current Syntax Variable: {{{2 let b:current_syntax = "vim"