blob: 56be4324d9a153c2ef5dd91b8af03814723e7e6b [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaarff1d0d42007-05-10 17:24:16 +00002" Language: Vim 7.1 script
Bram Moolenaar071d4272004-06-13 20:20:40 +00003" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
Bram Moolenaarf313d682007-05-12 13:36:14 +00004" Last Change: May 11, 2007
5" Version: 7.1-67
Bram Moolenaar071d4272004-06-13 20:20:40 +00006" Automatically generated keyword lists: {{{1
7
8" Quit when a syntax file was already loaded {{{2
9if exists("b:current_syntax")
10 finish
11endif
12
13" vimTodo: contains common special-notices for comments {{{2
14" Use the vimCommentGroup cluster to add your own.
Bram Moolenaar18144c82006-04-12 21:52:12 +000015syn keyword vimTodo contained COMBAK FIXME TODO XXX
Bram Moolenaar217ad922005-03-20 22:37:15 +000016syn cluster vimCommentGroup contains=vimTodo,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000017
18" regular vim commands {{{2
Bram Moolenaarf313d682007-05-12 13:36:14 +000019syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cgetb[uffer] cgete[xpr] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] earlier echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] hid[e] his[tory] ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] later lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lgetb[uffer] lgete[xpr] lg[etfile] lgr[ep] lgrepa[dd] lh[elpgrep] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] nu[mber] nun[map] omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sm[ap] smapc[lear] sme smenu sn[ext] sN[ext] sni[ff] sno[magic] snor[emap] snoreme snoremenu sor[t] so[urce] spelld[ump] spe[llgood] spelli[nfo] spellr[epall] spellu[ndo] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sunm[ap] sus[pend] sv[iew] syncbind t tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabl[ast] tabm[ove] tabnew tabn[ext] tabN[ext] tabo[nly] tabp[revious] tabr[ewind] tabs ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] xm[ap] xmapc[lear] xme xmenu XMLent XMLns xn[oremap] xnoreme xnoremenu xu[nmap] y[ank]
Bram Moolenaar071d4272004-06-13 20:20:40 +000020syn match vimCommand contained "\<z[-+^.=]"
21
22" vimOptions are caught only when contained in a vimSet {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +000023syn keyword vimOption contained acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cuc cul cursorcolumn cursorline cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs fex ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatexpr formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg gtl gtt guicursor guifont guifontset guifontwide guiheadroom guioptions guipty guitablabel guitabtooltip helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma macatsui magic makeef makeprg mat matchpairs matchtime maxcombine maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mco mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw odev oft ofu omnifunc opendevice operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn ph pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pumheight pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode showtabline shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta stal startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabline tabpagemax tabstop tag tagbsearch taglength tagrelative tags tagstack tal tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tpm tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wfw wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winfixwidth winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
25" vimOptions: These are the turn-off setting variants {{{2
Bram Moolenaarff1d0d42007-05-10 17:24:16 +000026syn keyword vimOption contained noacd noai noakm noallowrevins noaltkeymap noanti noantialias noar noarab noarabic noarabicshape noari noarshape noautochdir noautoindent noautoread noautowrite noautowriteall noaw noawa nobackup noballooneval nobeval nobin nobinary nobiosk nobioskey nobk nobl nobomb nobuflisted nocf noci nocin nocindent nocompatible noconfirm noconsk noconskey nocopyindent nocp nocscopetag nocscopeverbose nocst nocsverb nocuc nocul nocursorcolumn nocursorline nodeco nodelcombine nodg nodiff nodigraph nodisable noea noeb noed noedcompatible noek noendofline noeol noequalalways noerrorbells noesckeys noet noex noexpandtab noexrc nofen nofk nofkmap nofoldenable nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkmapp nohkp nohls nohlsearch noic noicon noignorecase noim noimc noimcmdline noimd noincsearch noinf noinfercase noinsertmode nois nojoinspaces nojs nolazyredraw nolbr nolinebreak nolisp nolist noloadplugins nolpl nolz noma nomacatsui nomagic nomh noml nomod nomodeline nomodifiable nomodified nomore nomousef nomousefocus nomousehide nonu nonumber noodev noopendevice nopaste nopi nopreserveindent nopreviewwindow noprompt nopvw noreadonly noremap norestorescreen norevins nori norightleft norightleftcmd norl norlc noro nors noru noruler nosb nosc noscb noscrollbind noscs nosecure nosft noshellslash noshelltemp noshiftround noshortname noshowcmd noshowfulltag noshowmatch noshowmode nosi nosm nosmartcase nosmartindent nosmarttab nosmd nosn nosol nospell nosplitbelow nosplitright nospr nosr nossl nosta nostartofline nostmp noswapfile noswf nota notagbsearch notagrelative notagstack notbi notbidi notbs notermbidi noterse notextauto notextmode notf notgst notildeop notimeout notitle noto notop notr nottimeout nottybuiltin nottyfast notx novb novisualbell nowa nowarn nowb noweirdinvert nowfh nowfw nowildmenu nowinfixheight nowinfixwidth nowiv nowmnu nowrap nowrapscan nowrite nowriteany nowritebackup nows
Bram Moolenaar071d4272004-06-13 20:20:40 +000027
28" vimOptions: These are the invertible variants {{{2
Bram Moolenaarff1d0d42007-05-10 17:24:16 +000029syn keyword vimOption contained invacd invai invakm invallowrevins invaltkeymap invanti invantialias invar invarab invarabic invarabicshape invari invarshape invautochdir invautoindent invautoread invautowrite invautowriteall invaw invawa invbackup invballooneval invbeval invbin invbinary invbiosk invbioskey invbk invbl invbomb invbuflisted invcf invci invcin invcindent invcompatible invconfirm invconsk invconskey invcopyindent invcp invcscopetag invcscopeverbose invcst invcsverb invcuc invcul invcursorcolumn invcursorline invdeco invdelcombine invdg invdiff invdigraph invdisable invea inveb inved invedcompatible invek invendofline inveol invequalalways inverrorbells invesckeys invet invex invexpandtab invexrc invfen invfk invfkmap invfoldenable invgd invgdefault invguipty invhid invhidden invhk invhkmap invhkmapp invhkp invhls invhlsearch invic invicon invignorecase invim invimc invimcmdline invimd invincsearch invinf invinfercase invinsertmode invis invjoinspaces invjs invlazyredraw invlbr invlinebreak invlisp invlist invloadplugins invlpl invlz invma invmacatsui invmagic invmh invml invmod invmodeline invmodifiable invmodified invmore invmousef invmousefocus invmousehide invnu invnumber invodev invopendevice invpaste invpi invpreserveindent invpreviewwindow invprompt invpvw invreadonly invremap invrestorescreen invrevins invri invrightleft invrightleftcmd invrl invrlc invro invrs invru invruler invsb invsc invscb invscrollbind invscs invsecure invsft invshellslash invshelltemp invshiftround invshortname invshowcmd invshowfulltag invshowmatch invshowmode invsi invsm invsmartcase invsmartindent invsmarttab invsmd invsn invsol invspell invsplitbelow invsplitright invspr invsr invssl invsta invstartofline invstmp invswapfile invswf invta invtagbsearch invtagrelative invtagstack invtbi invtbidi invtbs invtermbidi invterse invtextauto invtextmode invtf invtgst invtildeop invtimeout invtitle invto invtop invtr invttimeout invttybuiltin invttyfast invtx invvb invvisualbell invwa invwarn invwb invweirdinvert invwfh invwfw invwildmenu invwinfixheight invwinfixwidth invwiv invwmnu invwrap invwrapscan invwrite invwriteany invwritebackup invws
Bram Moolenaar071d4272004-06-13 20:20:40 +000030
31" termcap codes (which can also be set) {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +000032syn keyword vimOption contained t_AB t_AF t_al t_AL t_bc t_cd t_ce t_Ce t_cl t_cm t_Co t_cs t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
Bram Moolenaar071d4272004-06-13 20:20:40 +000033syn match vimOption contained "t_%1"
34syn match vimOption contained "t_#2"
35syn match vimOption contained "t_#4"
36syn match vimOption contained "t_@7"
37syn match vimOption contained "t_*7"
38syn match vimOption contained "t_&8"
39syn match vimOption contained "t_%i"
40syn match vimOption contained "t_k;"
41
42" unsupported settings: these are supported by vi but don't do anything in vim {{{2
Bram Moolenaarcd71fa32005-03-11 22:46:48 +000043syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
Bram Moolenaar071d4272004-06-13 20:20:40 +000044
Bram Moolenaar80a94a52006-02-23 21:26:58 +000045" AutoCmd Events {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +000046syn case ignore
Bram Moolenaarff1d0d42007-05-10 17:24:16 +000047syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
Bram Moolenaar071d4272004-06-13 20:20:40 +000048
49" Highlight commonly used Groupnames {{{2
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +000050syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +000051
52" Default highlighting groups {{{2
Bram Moolenaar3b1ddfe2006-03-14 22:55:34 +000053syn keyword vimHLGroup contained Cursor CursorColumn CursorIM CursorLine DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000054syn match vimHLGroup contained "Conceal"
Bram Moolenaar071d4272004-06-13 20:20:40 +000055syn case match
56
57" Function Names {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +000058syn keyword vimFuncName contained add append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call changenr char2nr cindent col complete complete_add complete_check confirm copy count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists expand expr8 extend feedkeys filereadable filewritable filter finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getpos getqflist getreg getregtype gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime map maparg mapcheck match matcharg matchend matchlist matchstr max min mkdir mode nextnonblank nr2char pathshorten prevnonblank printf pumvisible range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setpos setqflist setreg settabwinvar setwinvar shellescape simplify sort soundfold spellbadword spellsuggest split str2nr strftime stridx string strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tempname tolower toupper tr type values virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile
Bram Moolenaar071d4272004-06-13 20:20:40 +000059
60"--- syntax above generated by mkvimvim ---
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000061" Special Vim Highlighting (not automatic) {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +000062
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000063" Numbers {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +000064" =======
65syn match vimNumber "\<\d\+\([lL]\|\.\d\+\)\="
66syn match vimNumber "-\d\+\([lL]\|\.\d\+\)\="
67syn match vimNumber "\<0[xX]\x\+"
68syn match vimNumber "#\x\{6}"
69
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000070" All vimCommands are contained by vimIsCommands. {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +000071syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000072syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +000073syn match vimVar "\<[bwglsav]:\K\k*\>"
74syn match vimVar contained "\<\K\k*\>"
Bram Moolenaar3b1ddfe2006-03-14 22:55:34 +000075syn keyword vimCommand contained in
Bram Moolenaar071d4272004-06-13 20:20:40 +000076
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000077" Insertions And Appends: insert append {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +000078" =======================
79syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$""
80syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$""
81syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$""
82
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000083" Behave! {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +000084" =======
85syn match vimBehave "\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError
86syn keyword vimBehaveModel contained mswin xterm
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000087if !exists("g:vimsyntax_noerror")
88 syn match vimBehaveError contained "[^ ]\+"
89endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000090
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000091" Filetypes {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +000092" =========
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000093syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000094if !exists("g:vimsyntax_noerror")
95 syn match vimFTError contained "\I\i*"
96endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000097syn keyword vimFTCmd contained filet[ype]
98syn keyword vimFTOption contained detect indent off on plugin
99
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000100" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
102syn cluster vimAugroupList contains=vimIsCommand,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
103syn region vimAugroup start="\<aug\%[roup]\>\s\+\K\k*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
Bram Moolenaar3b1ddfe2006-03-14 22:55:34 +0000104syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000105if !exists("g:vimsyntax_noerror")
106 syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
107endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000108syn keyword vimAugroupKey contained aug[roup]
109
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000110" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000111" =========
Bram Moolenaar8299df92004-07-10 09:47:34 +0000112syn cluster vimFuncList contains=vimCommand,vimFuncKey,Tag,vimFuncSID
Bram Moolenaar071d4272004-06-13 20:20:40 +0000113syn cluster vimFuncBodyList contains=vimIsCommand,vimFunction,vimFunctionError,vimFuncBody,vimLineComment,vimSpecFile,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000114if !exists("g:vimsyntax_noerror")
115 syn match vimFunctionError "\<fu\%[nction]!\=\s\+\zs\U\i\{-}\ze\s*(" contains=vimFuncKey,vimFuncBlank nextgroup=vimFuncBody
116endif
Bram Moolenaar9964e462007-05-05 17:54:07 +0000117syn match vimFunction "\<fu\%[nction]!\=\s\+\(\(<[sS][iI][dD]>\|[Ss]:\|\u\)\i*\|g:\(\I\i*\.\)\+\I\i*\)\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
Bram Moolenaar071d4272004-06-13 20:20:40 +0000118syn region vimFuncBody contained start=")" end="\<endf\%[unction]" contains=@vimFuncBodyList
119syn match vimFuncVar contained "a:\(\I\i*\|\d\+\)"
120syn match vimFuncSID contained "\c<sid>\|\<s:"
121syn keyword vimFuncKey contained fu[nction]
122syn match vimFuncBlank contained "\s\+"
123
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000124syn keyword vimPattern contained start skip end
Bram Moolenaar071d4272004-06-13 20:20:40 +0000125
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000126" Operators: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000127" =========
Bram Moolenaarbfb2d402006-03-03 22:50:42 +0000128syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000129syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
130syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
Bram Moolenaar18144c82006-04-12 21:52:12 +0000131syn region vimOperParen oneline matchgroup=vimOper start="(" end=")" contains=@vimOperGroup
Bram Moolenaarc1e37902006-04-18 21:55:01 +0000132syn region vimOperParen oneline matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000133if !exists("g:vimsyntax_noerror")
134 syn match vimOperError ")"
135endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000137" Special Filenames, Modifiers, Extension Removal: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000138" ===============================================
139syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst
140syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst
141syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst
142syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst
143syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst
144syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst
145syn match vimSpecFileMod "\(:[phtre]\)\+" contained
146
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000147" User-Specified Commands: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000148" =======================
149syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFunction,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
150syn keyword vimUserCommand contained com[mand]
151syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserCommand,@vimUserCmdList
152syn match vimUserAttrb contained "-n\%[args]=[01*?+]" contains=vimUserAttrbKey,vimOper
153syn match vimUserAttrb contained "-com\%[plete]=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
154syn match vimUserAttrb contained "-ra\%[nge]\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
155syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vimUserAttrbKey
156syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey
157syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
158syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000159if !exists("g:vimsyntax_noerror")
160 syn match vimUserCmdError contained "\S\+\>"
161endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000162syn case ignore
163syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister]
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000164syn keyword vimUserAttrbCmplt contained augroup buffer command dir environment event expression file function help highlight mapping menu option something tag tag_listfiles var
165syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
Bram Moolenaar9964e462007-05-05 17:54:07 +0000166syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\u\w*\)\+\|\u\w*\)"hs=s+1 nextgroup=vimUserCmdError
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000167
Bram Moolenaar071d4272004-06-13 20:20:40 +0000168syn case match
169syn match vimUserAttrbCmplt contained "custom,\u\w*"
170
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000171" Errors: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172" ======
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000173if !exists("g:vimsyntax_noerror")
174 syn match vimElseIfErr "\<else\s\+if\>"
175endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000176
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000177" Lower Priority Comments: after some vim commands... {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000178" =======================
179syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
180syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
181syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
Bram Moolenaar4770d092006-01-12 23:22:24 +0000182syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000183
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000184" Environment Variables: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000185" =====================
186syn match vimEnvvar "\$\I\i*"
187syn match vimEnvvar "\${\I\i*}"
188
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000189" In-String Specials: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190" Try to catch strings, if nothing else matches (therefore it must precede the others!)
191" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
Bram Moolenaard68071d2006-05-02 22:08:30 +0000192syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000193syn match vimPatSepErr contained "\\)"
194syn match vimPatSep contained "\\|"
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000195syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\]['"]" contains=@vimStringGroup
196syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197syn match vimNotPatSep contained "\\\\"
Bram Moolenaar9964e462007-05-05 17:54:07 +0000198syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000199syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000200syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+
Bram Moolenaar071d4272004-06-13 20:20:40 +0000201syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup
202syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup
Bram Moolenaar071d4272004-06-13 20:20:40 +0000203syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup
204syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
205syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
206
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000207" Substitutions: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000208" =============
209syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
210syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
211syn cluster vimSubstList add=vimCollection
212syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<s\%[ubstitute][:[:alpha:]]\@!" nextgroup=vimSubstPat
213syn match vimSubst "s\%[ubstitute][:[:alpha:]]\@!" nextgroup=vimSubstPat contained
214syn match vimSubst "/\zss\%[ubstitute]\ze/" nextgroup=vimSubstPat
215syn match vimSubst1 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat
216syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline
217syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
218syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass
219syn match vimCollClassErr contained "\[:.\{-\}:\]"
220syn match vimCollClass contained transparent "\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]"
221syn match vimSubstSubstr contained "\\z\=\d"
222syn match vimSubstTwoBS contained "\\\\"
Bram Moolenaara5792f52005-11-23 21:25:05 +0000223syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
Bram Moolenaar071d4272004-06-13 20:20:40 +0000224syn match vimSubstFlags contained "[&cegiIpr]\+"
225
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000226" 'String': {{{2
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000227syn match vimString "[^(,]'[^']\{-}\zs'"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000228
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000229" Marks, Registers, Addresses, Filters: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000230syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst
231syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst
232syn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst
233syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst
234syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst
235syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper
236syn match vimPlainMark contained "'[a-zA-Z0-9]"
237
Bram Moolenaar9964e462007-05-05 17:54:07 +0000238syn match vimRegister '[^,;]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":]'
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000239syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
240syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000241syn match vimRegister '@"'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000242syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]'
243
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000244syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
245syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000246
247syn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile
248syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile
249
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000250" Complex repeats (:h complex-repeat) {{{2
Bram Moolenaar19a09a12005-03-04 23:39:37 +0000251"syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]'lc=1
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000252"syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\)'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000253
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000254" Set command and associated set-options (vimOptions) with comment {{{2
Bram Moolenaarc1e37902006-04-18 21:55:01 +0000255syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|set\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
Bram Moolenaar8b6144b2006-02-08 09:20:24 +0000256syn region vimSetEqual contained start="=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation oneline
Bram Moolenaar071d4272004-06-13 20:20:40 +0000257syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
258syn match vimSetSep contained "[,:]"
259syn match vimSetMod contained "&vim\|[!&]\|all&"
260
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000261" Let {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000262" ===
263syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar
264
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000265" Autocmd {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266" =======
267syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
268syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
269syn match vimAutoCmdSfxList contained "\S*"
270syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
271
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000272" Echo and Execute -- prefer strings! {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273" ================
274syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimString,varVar
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000275syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimIsCommand,vimString,vimOper,vimVar,vimNotation,vimOperParen
Bram Moolenaar071d4272004-06-13 20:20:40 +0000276syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone
277syn case ignore
278syn keyword vimEchoHLNone none
279syn case match
280
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000281" Maps {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000282" ====
Bram Moolenaarb8a7b562006-02-01 21:47:16 +0000283syn match vimMap "\<map!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
Bram Moolenaar9964e462007-05-05 17:54:07 +0000284syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] snor[emap] vm[ap] vn[oremap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
Bram Moolenaarb8a7b562006-02-01 21:47:16 +0000285syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
286syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
Bram Moolenaar25e2c9e2006-04-27 21:40:34 +0000287syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
Bram Moolenaarb8a7b562006-02-01 21:47:16 +0000288syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
289syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290syn case ignore
Bram Moolenaar25e2c9e2006-04-27 21:40:34 +0000291syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique
Bram Moolenaar071d4272004-06-13 20:20:40 +0000292syn case match
293
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000294" Menus {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000295" =====
296syn cluster vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod
297syn keyword vimCommand am[enu] an[oremenu] aun[menu] cme[nu] cnoreme[nu] cunme[nu] ime[nu] inoreme[nu] iunme[nu] me[nu] nme[nu] nnoreme[nu] noreme[nu] nunme[nu] ome[nu] onoreme[nu] ounme[nu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] skipwhite nextgroup=@vimMenuList
298syn match vimMenuName "[^ \t\\<]\+" contained nextgroup=vimMenuNameMore,vimMenuMap
299syn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMenuName
300syn match vimMenuNameMore "\c\\\s\|<tab>\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation
301syn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList
302syn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs
303syn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vimIsCommand
304syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
305
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000306" Angle-Bracket Notation (tnx to Michael Geddes) {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000307" ======================
308syn case ignore
Bram Moolenaar9964e462007-05-05 17:54:07 +0000309syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|space\|k\=\(page\)\=\(\|down\|up\)\)>" contains=vimBracket
Bram Moolenaar071d4272004-06-13 20:20:40 +0000310syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
Bram Moolenaard68071d2006-05-02 22:08:30 +0000311syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
312syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
313syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|f-args\|lt\)>' contains=vimBracket
314syn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket
Bram Moolenaar071d4272004-06-13 20:20:40 +0000315syn match vimBracket contained "[\\<>]"
316syn case match
317
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000318" User Function Highlighting (following Gautam Iyer's suggestion) {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000319" ==========================
Bram Moolenaar9964e462007-05-05 17:54:07 +0000320syn match vimFunc "\%(\%([gGsS]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9.]\+\.\)*\I[a-zA-Z0-9.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
321syn match vimUserFunc contained "\%(\%([gGsS]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9.]\+\.\)*\I[a-zA-Z0-9.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
322syn match vimNotFunc "\<if\>\|\<el\%[seif]\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000323
Bram Moolenaar05159a02005-02-26 23:04:13 +0000324" Norm
325" ====
326syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds
327syn match vimNormCmds contained ".*$"
328
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000329" Syntax {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000330"=======
331syn match vimGroupList contained "@\=[^ \t,]*" contains=vimGroupSpecial,vimPatSep
332syn match vimGroupList contained "@\=[^ \t,]*," nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep
333syn keyword vimGroupSpecial contained ALL ALLBUT
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000334if !exists("g:vimsyntax_noerror")
335 syn match vimSynError contained "\i\+"
336 syn match vimSynError contained "\i\+=" nextgroup=vimGroupList
337endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000338syn match vimSynContains contained "\<contain\(s\|edin\)=" nextgroup=vimGroupList
339syn match vimSynKeyContainedin contained "\<containedin=" nextgroup=vimGroupList
340syn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList
341
342syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
343syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
344
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000345" Syntax: case {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000346syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000347if !exists("g:vimsyntax_noerror")
348 syn match vimSynCaseError contained "\i\+"
349endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000350syn keyword vimSynCase contained ignore match
351
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000352" Syntax: clear {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000353syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList
354
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000355" Syntax: cluster {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000356syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
357syn region vimClusterName contained matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
358syn match vimGroupAdd contained "add=" nextgroup=vimGroupList
359syn match vimGroupRem contained "remove=" nextgroup=vimGroupList
360
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000361" Syntax: include {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000362syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
363
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000364" Syntax: keyword {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000365syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
366syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
367syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
368syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
369
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000370" Syntax: match {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000371syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
372syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
373syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
374syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
375if has("conceal")
376 syn match vimSynMtchOpt contained "\<cchar=" nextgroup=VimSynMtchCchar
377 syn match vimSynMtchCchar contained "."
378endif
379
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000380" Syntax: off and on {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000381syn keyword vimSynType contained enable list manual off on reset
382
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000383" Syntax: region {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000384syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
385syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
386syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
387syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
388syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
389syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat
390syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
391syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
392syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
393syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
394syn match vimSynPatMod contained "lc=\d\+"
395syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
396syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
397syn match vimSynNotPatRange contained "\\\\\|\\\["
398syn match vimMtchComment contained '"[^"]\+$'
399
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000400" Syntax: sync {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000401" ============
Bram Moolenaardf177f62005-02-22 08:39:57 +0000402syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000403if !exists("g:vimsyntax_noerror")
404 syn match vimSyncError contained "\i\+"
405endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000406syn keyword vimSyncC contained ccomment clear fromstart
407syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName
408syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg
Bram Moolenaardf177f62005-02-22 08:39:57 +0000409syn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber
Bram Moolenaar071d4272004-06-13 20:20:40 +0000410syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat
411syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber
412syn match vimSyncGroupName contained "\k\+" skipwhite nextgroup=vimSyncKey
413syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup
414syn match vimSyncGroup contained "\k\+" skipwhite nextgroup=vimSynRegPat,vimSyncNone
415syn keyword vimSyncNone contained NONE
416
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000417" Additional IsCommand, here by reasons of precedence {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000418" ====================
419syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation
420
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000421" Highlighting {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000422" ============
423syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment
424syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster
425syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster
426
427syn match vimHiGroup contained "\i\+"
428syn case ignore
Bram Moolenaar4770d092006-01-12 23:22:24 +0000429syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000430syn keyword vimFgBgAttrib contained none bg background fg foreground
431syn case match
432syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
433syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList
434syn case ignore
435syn keyword vimHiCtermColor contained black blue brown cyan darkBlue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred magenta red white yellow
436
437syn case match
438syn match vimHiFontname contained "[a-zA-Z\-*]\+"
439syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'"
440syn match vimHiGuiRgb contained "#\x\{6}"
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000441if !exists("g:vimsyntax_noerror")
442 syn match vimHiCtermError contained "[^0-9]\i*"
443endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000444
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000445" Highlighting: hi group key=arg ... {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000446syn cluster vimHiCluster contains=vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation
447syn region vimHiKeyList contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||" contains=@vimHiCluster
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000448if !exists("g:vimsyntax_noerror")
449 syn match vimHiKeyError contained "\i\+="he=e-1
450endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000451syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList
452syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption
453syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
454syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
455syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
456syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
Bram Moolenaar4770d092006-01-12 23:22:24 +0000457syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
Bram Moolenaar071d4272004-06-13 20:20:40 +0000458syn match vimHiTermcap contained "\S\+" contains=vimNotation
459
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000460" Highlight: clear {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000461syn keyword vimHiClear contained clear nextgroup=vimHiGroup
462
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000463" Highlight: link {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000464syn region vimHiLink contained oneline matchgroup=vimCommand start="\<\(def\s\+\)\=link\>\|\<def\>" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
465
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000466" Control Characters {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467" ==================
468syn match vimCtrlChar "[- -]"
469
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000470" Beginners - Patterns that involve ^ {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471" =========
472syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
Bram Moolenaarff1d0d42007-05-10 17:24:16 +0000473syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474syn match vimContinue "^\s*\\"
475syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
476syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
477
Bram Moolenaar18144c82006-04-12 21:52:12 +0000478" Searches And Globals: {{{2
479" ====================
Bram Moolenaare2f98b92006-03-29 21:18:24 +0000480syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
481syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
Bram Moolenaar18144c82006-04-12 21:52:12 +0000482syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/'
483syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/'
Bram Moolenaare2f98b92006-03-29 21:18:24 +0000484
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000485" Scripts : perl,ruby : Benoit Cerrina {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000486" ======= python,tcl: Johannes Zellner
487
488" allow users to prevent embedded script syntax highlighting
489" when vim doesn't have perl/python/ruby/tcl support. Do
490" so by setting g:vimembedscript= 0 in the user's <.vimrc>.
491if !exists("g:vimembedscript")
492 let g:vimembedscript= 1
493endif
494
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000495" [-- perl --] {{{3
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496if (has("perl") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/perl.vim")
497 unlet! b:current_syntax
498 syn include @vimPerlScript <sfile>:p:h/perl.vim
499 syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript
500 syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript
501endif
502
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000503" [-- ruby --] {{{3
Bram Moolenaar071d4272004-06-13 20:20:40 +0000504if (has("ruby") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/ruby.vim")
505 unlet! b:current_syntax
506 syn include @vimRubyScript <sfile>:p:h/ruby.vim
507 syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript
508 syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript
509endif
510
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000511" [-- python --] {{{3
Bram Moolenaar071d4272004-06-13 20:20:40 +0000512if (has("python") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/python.vim")
513 unlet! b:current_syntax
514 syn include @vimPythonScript <sfile>:p:h/python.vim
515 syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
516 syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
517endif
518
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000519" [-- tcl --] {{{3
Bram Moolenaar9964e462007-05-05 17:54:07 +0000520if has("win32") || has("win95") || has("win64") || has("win16")
521 " apparently has("tcl") has been hanging vim on some windows systems with cygwin
522 let trytcl= (&shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') || g:vimembedscript
523else
524 let trytcl= 1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000525endif
Bram Moolenaar9964e462007-05-05 17:54:07 +0000526if trytcl
527 if (has("tcl") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/tcl.vim")
528 unlet! b:current_syntax
529 syn include @vimTclScript <sfile>:p:h/tcl.vim
530 syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
531 syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
532 endif
533endif
534unlet trytcl
Bram Moolenaar071d4272004-06-13 20:20:40 +0000535
Bram Moolenaar8299df92004-07-10 09:47:34 +0000536" [-- mzscheme --] {{{3
537if (has("mzscheme") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/scheme.vim")
538 unlet! b:current_syntax
539 let iskKeep= &isk
540 syn include @vimMzSchemeScript <sfile>:p:h/scheme.vim
541 let &isk= iskKeep
542 syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
543 syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
544endif
545
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000546" Synchronize (speed) {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000547"============
548if exists("g:vim_minlines")
549 exe "syn sync minlines=".g:vim_minlines
550endif
551if exists("g:vim_maxlines")
552 exe "syn sync maxlines=".g:vim_maxlines
553else
554 syn sync maxlines=60
555endif
556syn sync linecont "^\s\+\\"
557syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"
558
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000559" Highlighting Settings {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000560" ====================
561
562hi def link vimAuHighlight vimHighlight
563hi def link vimSubst1 vimSubst
564hi def link vimBehaveModel vimBehave
565
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000566if !exists("g:vimsyntax_noerror")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000567 hi def link vimBehaveError vimError
568 hi def link vimCollClassErr vimError
569 hi def link vimErrSetting vimError
570 hi def link vimFTError vimError
571 hi def link vimFunctionError vimError
Bram Moolenaar8299df92004-07-10 09:47:34 +0000572 hi def link vimFunc vimError
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000573 hi def link vimHiAttribList vimError
574 hi def link vimHiCtermError vimError
575 hi def link vimHiKeyError vimError
576 hi def link vimKeyCodeError vimError
577 hi def link vimMapModErr vimError
578 hi def link vimSubstFlagErr vimError
579 hi def link vimSynCaseError vimError
580endif
581
582hi def link vimAddress vimMark
Bram Moolenaar071d4272004-06-13 20:20:40 +0000583hi def link vimAugroupKey vimCommand
584hi def link vimAutoCmdOpt vimOption
585hi def link vimAutoCmd vimCommand
586hi def link vimAutoSet vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000587hi def link vimBehave vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000588hi def link vimCommentString vimString
589hi def link vimCondHL vimCommand
590hi def link vimEchoHLNone vimGroup
591hi def link vimEchoHL vimCommand
592hi def link vimElseif vimCondHL
Bram Moolenaar071d4272004-06-13 20:20:40 +0000593hi def link vimFgBgAttrib vimHiAttrib
594hi def link vimFTCmd vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000595hi def link vimFTOption vimSynType
Bram Moolenaar071d4272004-06-13 20:20:40 +0000596hi def link vimFuncKey vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000597hi def link vimGroupAdd vimSynOption
598hi def link vimGroupRem vimSynOption
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599hi def link vimHiCtermFgBg vimHiTerm
600hi def link vimHiCTerm vimHiTerm
601hi def link vimHighlight vimCommand
602hi def link vimHiGroup vimGroupName
603hi def link vimHiGuiFgBg vimHiTerm
604hi def link vimHiGuiFont vimHiTerm
605hi def link vimHiGuiRgb vimNumber
606hi def link vimHiGui vimHiTerm
Bram Moolenaar071d4272004-06-13 20:20:40 +0000607hi def link vimHiStartStop vimHiTerm
608hi def link vimHLGroup vimGroup
609hi def link vimInsert vimString
Bram Moolenaar071d4272004-06-13 20:20:40 +0000610hi def link vimKeyCode vimSpecFile
611hi def link vimLet vimCommand
612hi def link vimLineComment vimComment
613hi def link vimMapBang vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000614hi def link vimMapModKey vimFuncSID
615hi def link vimMapMod vimBracket
616hi def link vimMap vimCommand
617hi def link vimMarkNumber vimNumber
618hi def link vimMenuMod vimMapMod
619hi def link vimMenuNameMore vimMenuName
620hi def link vimMtchComment vimComment
Bram Moolenaar05159a02005-02-26 23:04:13 +0000621hi def link vimNorm vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000622hi def link vimNotPatSep vimString
Bram Moolenaar383f9bc2005-01-19 22:18:32 +0000623hi def link vimPatSepR vimPatSep
624hi def link vimPatSepZ vimPatSep
Bram Moolenaar071d4272004-06-13 20:20:40 +0000625hi def link vimPatSepErr vimPatSep
626hi def link vimPatSepZone vimString
627hi def link vimPlainMark vimMark
628hi def link vimPlainRegister vimRegister
Bram Moolenaare2f98b92006-03-29 21:18:24 +0000629hi def link vimSearch vimString
630hi def link vimSearchDelim Statement
Bram Moolenaar071d4272004-06-13 20:20:40 +0000631hi def link vimSetMod vimOption
632hi def link vimSetString vimString
633hi def link vimSpecFileMod vimSpecFile
634hi def link vimStringCont vimString
Bram Moolenaar071d4272004-06-13 20:20:40 +0000635hi def link vimSubstTwoBS vimString
636hi def link vimSubst vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000637hi def link vimSyncGroupName vimGroupName
638hi def link vimSyncGroup vimGroupName
639hi def link vimSynContains vimSynOption
640hi def link vimSynKeyContainedin vimSynContains
641hi def link vimSynKeyOpt vimSynOption
642hi def link vimSynMtchGrp vimSynOption
643hi def link vimSynMtchOpt vimSynOption
644hi def link vimSynNextgroup vimSynOption
645hi def link vimSynNotPatRange vimSynRegPat
646hi def link vimSynPatRange vimString
647hi def link vimSynRegOpt vimSynOption
648hi def link vimSynRegPat vimString
649hi def link vimSyntax vimCommand
650hi def link vimSynType vimSpecial
651hi def link vimUserAttrbCmplt vimSpecial
652hi def link vimUserAttrbKey vimOption
653hi def link vimUserAttrb vimSpecial
654hi def link vimUserCommand vimCommand
655hi def link vimUserFunc Normal
656
657hi def link vimAutoEvent Type
658hi def link vimBracket Delimiter
659hi def link vimCmplxRepeat SpecialChar
660hi def link vimCommand Statement
661hi def link vimComment Comment
662hi def link vimCommentTitle PreProc
663hi def link vimContinue Special
664hi def link vimCtrlChar SpecialChar
665hi def link vimElseIfErr Error
666hi def link vimEnvvar PreProc
667hi def link vimError Error
668hi def link vimFold Folded
669hi def link vimFuncName Function
670hi def link vimFuncSID Special
671hi def link vimFuncVar Identifier
672hi def link vimGroup Type
673hi def link vimGroupSpecial Special
674hi def link vimHLMod PreProc
675hi def link vimHiAttrib PreProc
676hi def link vimHiTerm Type
677hi def link vimKeyword Statement
678hi def link vimMark Number
679hi def link vimMenuName PreProc
680hi def link vimNotation Special
Bram Moolenaar9964e462007-05-05 17:54:07 +0000681hi def link vimNotFunc vimCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +0000682hi def link vimNumber Number
683hi def link vimOper Operator
684hi def link vimOption PreProc
685hi def link vimOperError Error
686hi def link vimPatSep SpecialChar
687hi def link vimPattern Type
688hi def link vimRegister SpecialChar
689hi def link vimScriptDelim Comment
690hi def link vimSep Delimiter
691hi def link vimSetSep Statement
692hi def link vimSpecFile Identifier
693hi def link vimSpecial Type
694hi def link vimStatement Statement
695hi def link vimString String
696hi def link vimSubstDelim Delimiter
697hi def link vimSubstFlags Special
698hi def link vimSubstSubstr SpecialChar
699hi def link vimSynCase Type
700hi def link vimSynCaseError Error
701hi def link vimSynError Error
702hi def link vimSynOption Special
703hi def link vimSynReg Type
704hi def link vimSyncC Type
705hi def link vimSyncError Error
706hi def link vimSyncKey Type
707hi def link vimSyncNone Type
708hi def link vimTodo Todo
709hi def link vimUserCmdError Error
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000710hi def link vimUserAttrbCmpltFunc Special
Bram Moolenaar071d4272004-06-13 20:20:40 +0000711
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000712" Current Syntax Variable: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000713let b:current_syntax = "vim"
714" vim:ts=18 fdm=marker