xref: /vim-8.2.3635/runtime/syntax/vim.vim (revision 03413f44)
1071d4279SBram Moolenaar" Vim syntax file
27cba6c06SBram Moolenaar" Language:	Vim 7.4 script
37cba6c06SBram Moolenaar" Maintainer:	Charles E. Campbell <[email protected]>
4*03413f44SBram Moolenaar" Last Change:	April 12, 2016
5*03413f44SBram Moolenaar" Version:	7.4-47
6071d4279SBram Moolenaar" Automatically generated keyword lists: {{{1
7071d4279SBram Moolenaar
8071d4279SBram Moolenaar" Quit when a syntax file was already loaded {{{2
9071d4279SBram Moolenaarif exists("b:current_syntax")
10071d4279SBram Moolenaar  finish
11071d4279SBram Moolenaarendif
126be7f873SBram Moolenaarlet s:keepcpo= &cpo
136be7f873SBram Moolenaarset cpo&vim
14071d4279SBram Moolenaar
15071d4279SBram Moolenaar" vimTodo: contains common special-notices for comments {{{2
16071d4279SBram Moolenaar" Use the vimCommentGroup cluster to add your own.
17e2719096SBram Moolenaarsyn keyword vimTodo contained	COMBAK	FIXME	TODO	XXX
18217ad920SBram Moolenaarsyn cluster vimCommentGroup	contains=vimTodo,@Spell
19071d4279SBram Moolenaar
20071d4279SBram Moolenaar" regular vim commands {{{2
21*03413f44SBram Moolenaarsyn keyword vimCommand contained	a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] ccl[ose] cfdo chd[ir] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k keepp[atterns] lad[dexpr] later lcs lex[pr] lgetb[uffer] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
22*03413f44SBram Moolenaarsyn keyword vimCommand contained	ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] cd cfir[st] che[ckpath] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lN[ext] laddb[uffer] lb[uffer] lcscope lf[ile] lgete[xpr] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
23*03413f44SBram Moolenaarsyn keyword vimCommand contained	abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cdo cg[etfile] checkt[ime] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa lNf[ile] laddf[ile] lc[d] ld[o] lfdo lgr[ep] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
24*03413f44SBram Moolenaarsyn keyword vimCommand contained	abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] ce[nter] cgetb[uffer] cl[ist] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt l[ist] lan[guage] lch[dir] le[ft] lfir[st] lgrepa[dd] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
25*03413f44SBram Moolenaarsyn keyword vimCommand contained	al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] cex[pr] cgete[xpr] cla[st] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] la[st] lat lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] packloadall po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
26*03413f44SBram Moolenaarsyn keyword vimCommand contained	ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cc cf[ile] changes clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fix[del] for gui helpg[rep] ia in ju[mps]
27e2719096SBram Moolenaarsyn match   vimCommand contained	"\<z[-+^.=]\=\>"
28a6878375SBram Moolenaarsyn keyword vimStdPlugin contained	DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
29071d4279SBram Moolenaar
30071d4279SBram Moolenaar" vimOptions are caught only when contained in a vimSet {{{2
31*03413f44SBram Moolenaarsyn keyword vimOption contained	acd ambw arshape background ballooneval bg bomb bs cb ch cinoptions cms commentstring copyindent cryptmethod cscopeverbose csverb debug dict dir eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime revins ro ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
32*03413f44SBram Moolenaarsyn keyword vimOption contained	ai anti autochdir backspace balloonexpr bh breakat bsdir cc charconvert cinw co compatible cot cscopepathcomp cspc cuc deco dictionary directory ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
33*03413f44SBram Moolenaarsyn keyword vimOption contained	akm antialias autoindent backup bdir bin breakindent bsk ccv ci cinwords cocu complete cp cscopeprg csprg cul def diff display edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relativenumber rightleft rs runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
34*03413f44SBram Moolenaarsyn keyword vimOption contained	al ar autoread backupcopy bdlay binary breakindentopt bt cd cin clipboard cole completefunc cpo cscopequickfix csqf cursorbind define diffexpr dy ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescape remap rightleftcmd rtp sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
35*03413f44SBram Moolenaarsyn keyword vimOption contained	aleph arab autowrite backupdir belloff bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph pp printfont pumheight rdt renderoptions rl ru sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tal tcldll textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
36*03413f44SBram Moolenaarsyn keyword vimOption contained	allowrevins arabic autowriteall backupext beval bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetag cst cursorline dex digraph ead ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh re report rlc rubydll sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
37*03413f44SBram Moolenaarsyn keyword vimOption contained	altkeymap arabicshape aw backupskip bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopetagorder csto cwh dg dip eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
38*03413f44SBram Moolenaarsyn keyword vimOption contained	ambiwidth ari awa balloondelay bexpr bo browsedir casemap cfu cino cmp comments confirm
39071d4279SBram Moolenaar
40071d4279SBram Moolenaar" vimOptions: These are the turn-off setting variants {{{2
41*03413f44SBram Moolenaarsyn keyword vimOption contained	noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noimdisable noinf noinsertmode nojoinspaces nolangnoremap nolbr nolisp nolnr nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
42*03413f44SBram Moolenaarsyn keyword vimOption contained	noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noincsearch noinfercase nois nojs nolazyredraw nolinebreak nolist noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
43*03413f44SBram Moolenaarsyn keyword vimOption contained	noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc
44071d4279SBram Moolenaar
45071d4279SBram Moolenaar" vimOptions: These are the invertible variants {{{2
46*03413f44SBram Moolenaarsyn keyword vimOption contained	invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invimdisable invinf invinsertmode invjoinspaces invlangnoremap invlbr invlisp invlnr invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup
47*03413f44SBram Moolenaarsyn keyword vimOption contained	invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invincsearch invinfercase invis invjs invlazyredraw invlinebreak invlist invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
48*03413f44SBram Moolenaarsyn keyword vimOption contained	invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc
49071d4279SBram Moolenaar
50071d4279SBram Moolenaar" termcap codes (which can also be set) {{{2
51939a1abeSBram Moolenaarsyn keyword vimOption contained	t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db 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_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
52939a1abeSBram Moolenaarsyn keyword vimOption contained	t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl
53071d4279SBram Moolenaarsyn match   vimOption contained	"t_%1"
54071d4279SBram Moolenaarsyn match   vimOption contained	"t_#2"
55071d4279SBram Moolenaarsyn match   vimOption contained	"t_#4"
56071d4279SBram Moolenaarsyn match   vimOption contained	"t_@7"
57071d4279SBram Moolenaarsyn match   vimOption contained	"t_*7"
58071d4279SBram Moolenaarsyn match   vimOption contained	"t_&8"
59071d4279SBram Moolenaarsyn match   vimOption contained	"t_%i"
60071d4279SBram Moolenaarsyn match   vimOption contained	"t_k;"
61071d4279SBram Moolenaar
62*03413f44SBram Moolenaar" unsupported settings: some were supported by vi but don't do anything in vim {{{2
63*03413f44SBram Moolenaar" others have been dropped along with msdos support
64*03413f44SBram Moolenaarsyn keyword vimErrSetting contained	bioskey biosk conskey consk autoprint beautify flash graphic hardtabs mesg novice open op optimize redraw slow slowopen sourceany w300 w1200 w9600 hardtabs ht nobioskey nobiosk noconskey noconsk noautoprint nobeautify noflash nographic nohardtabs nomesg nonovice noopen noop nooptimize noredraw noslow noslowopen nosourceany now300 now1200 now9600 w1200 w300 w9600
65071d4279SBram Moolenaar
6680a94a58SBram Moolenaar" AutoCmd Events {{{2
67071d4279SBram Moolenaarsyn case ignore
68*03413f44SBram Moolenaarsyn 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 CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone 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 InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse TextChanged TextChangedI User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
69071d4279SBram Moolenaar
70071d4279SBram Moolenaar" Highlight commonly used Groupnames {{{2
71b2c0350cSBram Moolenaarsyn 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
72071d4279SBram Moolenaar
73071d4279SBram Moolenaar" Default highlighting groups {{{2
74a6878375SBram Moolenaarsyn keyword vimHLGroup contained	ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr 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
75293ee4d4SBram Moolenaarsyn match vimHLGroup contained	"Conceal"
76071d4279SBram Moolenaarsyn case match
77071d4279SBram Moolenaar
78071d4279SBram Moolenaar" Function Names {{{2
79*03413f44SBram Moolenaarsyn keyword vimFuncName contained	abs and arglistid assert_exception assert_notequal atan2 buflisted bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eval exists extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions job_stop js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strdisplaywidth string strridx submatch synID synstack tabpagebuflist tagfiles tanh timer_stop tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
80*03413f44SBram Moolenaarsyn keyword vimFuncName contained	acos append argv assert_fails assert_notmatch browse bufloaded byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete disable_char_avail_for_testing eventhandler exp feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strftime strlen strtrans substitute synIDattr system tabpagenr taglist tempname tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
81*03413f44SBram Moolenaarsyn keyword vimFuncName contained	add argc asin assert_false assert_true browsedir bufname byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype empty executable expand filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strchars stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan timer_start toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
82*03413f44SBram Moolenaarsyn keyword vimFuncName contained	alloc_fail argidx assert_equal assert_match atan bufexists bufnr byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler escape exepath
83071d4279SBram Moolenaar
84ac7bd638SBram Moolenaar"--- syntax here and above generated by mkvimvim ---
85cfbc5ee4SBram Moolenaar" Special Vim Highlighting (not automatic) {{{1
86071d4279SBram Moolenaar
87a0f849eeSBram Moolenaar" Set up folding commands
88f391327aSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[aflmpPrt]'
89f391327aSBram Moolenaar if g:vimsyn_folding =~# 'a'
90a0f849eeSBram Moolenaar  com! -nargs=* VimFolda <args> fold
91a0f849eeSBram Moolenaar else
92a0f849eeSBram Moolenaar  com! -nargs=* VimFolda <args>
93a0f849eeSBram Moolenaar endif
94f391327aSBram Moolenaar if g:vimsyn_folding =~# 'f'
95a0f849eeSBram Moolenaar  com! -nargs=* VimFoldf <args> fold
96a0f849eeSBram Moolenaar else
97a0f849eeSBram Moolenaar  com! -nargs=* VimFoldf <args>
98a0f849eeSBram Moolenaar endif
99f391327aSBram Moolenaar if g:vimsyn_folding =~# 'l'
100a0f849eeSBram Moolenaar  com! -nargs=* VimFoldl <args> fold
101a0f849eeSBram Moolenaar else
102a0f849eeSBram Moolenaar  com! -nargs=* VimFoldl <args>
103a0f849eeSBram Moolenaar endif
104f391327aSBram Moolenaar if g:vimsyn_folding =~# 'm'
105a0f849eeSBram Moolenaar  com! -nargs=* VimFoldm <args> fold
106a0f849eeSBram Moolenaar else
107a0f849eeSBram Moolenaar  com! -nargs=* VimFoldm <args>
108a0f849eeSBram Moolenaar endif
109f391327aSBram Moolenaar if g:vimsyn_folding =~# 'p'
110a0f849eeSBram Moolenaar  com! -nargs=* VimFoldp <args> fold
111a0f849eeSBram Moolenaar else
112a0f849eeSBram Moolenaar  com! -nargs=* VimFoldp <args>
113a0f849eeSBram Moolenaar endif
114f391327aSBram Moolenaar if g:vimsyn_folding =~# 'P'
115a0f849eeSBram Moolenaar  com! -nargs=* VimFoldP <args> fold
116a0f849eeSBram Moolenaar else
117a0f849eeSBram Moolenaar  com! -nargs=* VimFoldP <args>
118a0f849eeSBram Moolenaar endif
119f391327aSBram Moolenaar if g:vimsyn_folding =~# 'r'
120a0f849eeSBram Moolenaar  com! -nargs=* VimFoldr <args> fold
121a0f849eeSBram Moolenaar else
122a0f849eeSBram Moolenaar  com! -nargs=* VimFoldr <args>
123a0f849eeSBram Moolenaar endif
124f391327aSBram Moolenaar if g:vimsyn_folding =~# 't'
125a0f849eeSBram Moolenaar  com! -nargs=* VimFoldt <args> fold
126a0f849eeSBram Moolenaar else
127a0f849eeSBram Moolenaar  com! -nargs=* VimFoldt <args>
128a0f849eeSBram Moolenaar endif
129a0f849eeSBram Moolenaarelse
130a0f849eeSBram Moolenaar com! -nargs=*	VimFolda	<args>
131a0f849eeSBram Moolenaar com! -nargs=*	VimFoldf	<args>
132a0f849eeSBram Moolenaar com! -nargs=*	VimFoldl	<args>
133a0f849eeSBram Moolenaar com! -nargs=*	VimFoldm	<args>
134a0f849eeSBram Moolenaar com! -nargs=*	VimFoldp	<args>
135a0f849eeSBram Moolenaar com! -nargs=*	VimFoldP	<args>
136a0f849eeSBram Moolenaar com! -nargs=*	VimFoldr	<args>
137a0f849eeSBram Moolenaar com! -nargs=*	VimFoldt	<args>
138a0f849eeSBram Moolenaarendif
139a0f849eeSBram Moolenaar
140fa01c39dSBram Moolenaar" commands not picked up by the generator (due to non-standard format)
141fa01c39dSBram Moolenaarsyn keyword vimCommand contained	py3
142fa01c39dSBram Moolenaar
1433577c6faSBram Moolenaar" Deprecated variable options {{{2
1443577c6faSBram Moolenaarif exists("g:vim_minlines")
1453577c6faSBram Moolenaar let g:vimsyn_minlines= g:vim_minlines
1463577c6faSBram Moolenaarendif
1473577c6faSBram Moolenaarif exists("g:vim_maxlines")
1483577c6faSBram Moolenaar let g:vimsyn_maxlines= g:vim_maxlines
1493577c6faSBram Moolenaarendif
1503577c6faSBram Moolenaarif exists("g:vimsyntax_noerror")
1513577c6faSBram Moolenaar let g:vimsyn_noerror= g:vimsyntax_noerror
1523577c6faSBram Moolenaarendif
1533577c6faSBram Moolenaar
154*03413f44SBram Moolenaar" Variable options {{{2
155*03413f44SBram Moolenaarif exists("g:vim_maxlines")
156*03413f44SBram Moolenaar let s:vimsyn_maxlines= g:vim_maxlines
157*03413f44SBram Moolenaarelse
158*03413f44SBram Moolenaar let s:vimsyn_maxlines= 60
159*03413f44SBram Moolenaarendif
160*03413f44SBram Moolenaar
161cfbc5ee4SBram Moolenaar" Numbers {{{2
162071d4279SBram Moolenaar" =======
1639da7ff70SBram Moolenaarsyn match vimNumber	"\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
1649da7ff70SBram Moolenaarsyn match vimNumber	"-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\="  skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
165071d4279SBram Moolenaarsyn match vimNumber	"\<0[xX]\x\+"
166e2719096SBram Moolenaarsyn match vimNumber	"\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
167071d4279SBram Moolenaar
168cfbc5ee4SBram Moolenaar" All vimCommands are contained by vimIsCommands. {{{2
169b4ff518dSBram Moolenaarsyn match vimCmdSep	"[:|]\+"	skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
170293ee4d4SBram Moolenaarsyn match vimIsCommand	"\<\h\w*\>"	contains=vimCommand
17183d1b190SBram Moolenaarsyn match vimVar        contained	"\<\h[a-zA-Z0-9#_]*\>"
17283d1b190SBram Moolenaarsyn match vimVar		"\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
17383d1b190SBram Moolenaarsyn match vimFBVar      contained   "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
1743b1ddfedSBram Moolenaarsyn keyword vimCommand  contained	in
175071d4279SBram Moolenaar
176cfbc5ee4SBram Moolenaar" Insertions And Appends: insert append {{{2
177071d4279SBram Moolenaar" =======================
178071d4279SBram Moolenaarsyn region vimInsert	matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$"	matchgroup=vimCommand end="^\.$""
179071d4279SBram Moolenaarsyn region vimInsert	matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$"	matchgroup=vimCommand end="^\.$""
180071d4279SBram Moolenaarsyn region vimInsert	matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$"	matchgroup=vimCommand end="^\.$""
181071d4279SBram Moolenaar
182cfbc5ee4SBram Moolenaar" Behave! {{{2
183071d4279SBram Moolenaar" =======
184071d4279SBram Moolenaarsyn match   vimBehave	"\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError
185071d4279SBram Moolenaarsyn keyword vimBehaveModel contained	mswin	xterm
1866be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror")
187071d4279SBram Moolenaar syn match   vimBehaveError contained	"[^ ]\+"
188cfbc5ee4SBram Moolenaarendif
189071d4279SBram Moolenaar
190cfbc5ee4SBram Moolenaar" Filetypes {{{2
191071d4279SBram Moolenaar" =========
192293ee4d4SBram Moolenaarsyn match   vimFiletype	"\<filet\%[ype]\(\s\+\I\i*\)*"	skipwhite contains=vimFTCmd,vimFTOption,vimFTError
1936be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError")
194071d4279SBram Moolenaar syn match   vimFTError  contained	"\I\i*"
195cfbc5ee4SBram Moolenaarendif
196071d4279SBram Moolenaarsyn keyword vimFTCmd    contained	filet[ype]
197071d4279SBram Moolenaarsyn keyword vimFTOption contained	detect indent off on plugin
198071d4279SBram Moolenaar
199cfbc5ee4SBram Moolenaar" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
200071d4279SBram Moolenaar" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
201e2719096SBram Moolenaarsyn cluster vimAugroupList	contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
202f391327aSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
203b4ff518dSBram Moolenaar syn region  vimAugroup	fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"	contains=vimAutoCmd,@vimAugroupList
204b4ff518dSBram Moolenaarelse
205b4ff518dSBram Moolenaar syn region  vimAugroup	matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"	contains=vimAutoCmd,@vimAugroupList
206b4ff518dSBram Moolenaarendif
2073b1ddfedSBram Moolenaarsyn match   vimAugroup	"aug\%[roup]!"	contains=vimAugroupKey
2086be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
209071d4279SBram Moolenaar syn match   vimAugroupError	"\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
210cfbc5ee4SBram Moolenaarendif
21183d1b190SBram Moolenaarsyn keyword vimAugroupKey contained	aug[roup]
212071d4279SBram Moolenaar
213cfbc5ee4SBram Moolenaar" Operators: {{{2
214071d4279SBram Moolenaar" =========
2159da7ff70SBram Moolenaarsyn cluster	vimOperGroup	contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
216071d4279SBram Moolenaarsyn match	vimOper	"\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}"	skipwhite nextgroup=vimString,vimSpecFile
217071d4279SBram Moolenaarsyn match	vimOper	"||\|&&\|[-+.]"	skipwhite nextgroup=vimString,vimSpecFile
21883d1b190SBram Moolenaarsyn region	vimOperParen 	matchgroup=vimParenSep	start="(" end=")" contains=@vimOperGroup
21983d1b190SBram Moolenaarsyn region	vimOperParen	matchgroup=vimSep		start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
2206be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
221071d4279SBram Moolenaar syn match	vimOperError	")"
222cfbc5ee4SBram Moolenaarendif
223071d4279SBram Moolenaar
2243577c6faSBram Moolenaar" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
2253577c6faSBram Moolenaar" =========
2265c73622aSBram Moolenaarsyn cluster	vimFuncList	contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
227b4ff518dSBram Moolenaarsyn cluster	vimFuncBodyList	contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
2285c73622aSBram Moolenaarsyn match	vimFunction	"\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*("	contains=@vimFuncList nextgroup=vimFuncBody
2295c73622aSBram Moolenaar
230f391327aSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
231b4ff518dSBram Moolenaar syn region	vimFuncBody  contained	fold start="\ze\s*("	matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)"		contains=@vimFuncBodyList
232b4ff518dSBram Moolenaarelse
233b4ff518dSBram Moolenaar syn region	vimFuncBody  contained	start="\ze\s*("	matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)"		contains=@vimFuncBodyList
234b4ff518dSBram Moolenaarendif
235b4ff518dSBram Moolenaarsyn match	vimFuncVar   contained	"a:\(\K\k*\|\d\+\)"
2363577c6faSBram Moolenaarsyn match	vimFuncSID   contained	"\c<sid>\|\<s:"
2373577c6faSBram Moolenaarsyn keyword	vimFuncKey   contained	fu[nction]
2383577c6faSBram Moolenaarsyn match	vimFuncBlank contained	"\s\+"
2393577c6faSBram Moolenaar
2403577c6faSBram Moolenaarsyn keyword	vimPattern   contained	start	skip	end
2413577c6faSBram Moolenaar
242cfbc5ee4SBram Moolenaar" Special Filenames, Modifiers, Extension Removal: {{{2
243071d4279SBram Moolenaar" ===============================================
244071d4279SBram Moolenaarsyn match	vimSpecFile	"<c\(word\|WORD\)>"	nextgroup=vimSpecFileMod,vimSubst
245071d4279SBram Moolenaarsyn match	vimSpecFile	"<\([acs]file\|amatch\|abuf\)>"	nextgroup=vimSpecFileMod,vimSubst
246071d4279SBram Moolenaarsyn match	vimSpecFile	"\s%[ \t:]"ms=s+1,me=e-1	nextgroup=vimSpecFileMod,vimSubst
247071d4279SBram Moolenaarsyn match	vimSpecFile	"\s%$"ms=s+1	nextgroup=vimSpecFileMod,vimSubst
248071d4279SBram Moolenaarsyn match	vimSpecFile	"\s%<"ms=s+1,me=e-1	nextgroup=vimSpecFileMod,vimSubst
249071d4279SBram Moolenaarsyn match	vimSpecFile	"#\d\+\|[#%]<\>"	nextgroup=vimSpecFileMod,vimSubst
250071d4279SBram Moolenaarsyn match	vimSpecFileMod	"\(:[phtre]\)\+"	contained
251071d4279SBram Moolenaar
252cfbc5ee4SBram Moolenaar" User-Specified Commands: {{{2
253071d4279SBram Moolenaar" =======================
2545c73622aSBram Moolenaarsyn cluster	vimUserCmdList	contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
255071d4279SBram Moolenaarsyn keyword	vimUserCommand	contained	com[mand]
256b4ff518dSBram Moolenaarsyn match	vimUserCmd	"\<com\%[mand]!\=\>.*$"	contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
257b4ff518dSBram Moolenaarsyn match	vimUserAttrbError	contained	"-\a\+\ze\s"
258b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-nargs=[01*?+]"	contains=vimUserAttrbKey,vimOper
259b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-complete="		contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
260b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-range\(=%\|=\d\+\)\="	contains=vimNumber,vimOper,vimUserAttrbKey
261b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-count\(=\d\+\)\="	contains=vimNumber,vimOper,vimUserAttrbKey
262b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-bang\>"		contains=vimOper,vimUserAttrbKey
263071d4279SBram Moolenaarsyn match	vimUserAttrb	contained	"-bar\>"		contains=vimOper,vimUserAttrbKey
264b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-buffer\>"		contains=vimOper,vimUserAttrbKey
265b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-register\>"		contains=vimOper,vimUserAttrbKey
2666be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
267071d4279SBram Moolenaar syn match	vimUserCmdError	contained	"\S\+\>"
268cfbc5ee4SBram Moolenaarendif
269071d4279SBram Moolenaarsyn case ignore
270071d4279SBram Moolenaarsyn keyword	vimUserAttrbKey   contained	bar	ban[g]	cou[nt]	ra[nge] com[plete]	n[args]	re[gister]
2719da7ff70SBram Moolenaarsyn 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
272a93fa7eeSBram Moolenaarsyn keyword	vimUserAttrbCmplt contained	custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
2739da7ff70SBram Moolenaarsyn match	vimUserAttrbCmpltFunc contained	",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError
274a93fa7eeSBram Moolenaar
275071d4279SBram Moolenaarsyn case match
276071d4279SBram Moolenaarsyn match	vimUserAttrbCmplt contained	"custom,\u\w*"
277071d4279SBram Moolenaar
278cfbc5ee4SBram Moolenaar" Lower Priority Comments: after some vim commands... {{{2
279071d4279SBram Moolenaar" =======================
280071d4279SBram Moolenaarsyn match	vimComment	excludenl +\s"[^\-:.%#=*].*$+lc=1	contains=@vimCommentGroup,vimCommentString
281071d4279SBram Moolenaarsyn match	vimComment	+\<endif\s\+".*$+lc=5	contains=@vimCommentGroup,vimCommentString
282071d4279SBram Moolenaarsyn match	vimComment	+\<else\s\+".*$+lc=4	contains=@vimCommentGroup,vimCommentString
2834770d09aSBram Moolenaarsyn region	vimCommentString	contained oneline start='\S\s\+"'ms=e	end='"'
284071d4279SBram Moolenaar
285cfbc5ee4SBram Moolenaar" Environment Variables: {{{2
286071d4279SBram Moolenaar" =====================
287071d4279SBram Moolenaarsyn match	vimEnvvar	"\$\I\i*"
288071d4279SBram Moolenaarsyn match	vimEnvvar	"\${\I\i*}"
289071d4279SBram Moolenaar
290cfbc5ee4SBram Moolenaar" In-String Specials: {{{2
291071d4279SBram Moolenaar" Try to catch strings, if nothing else matches (therefore it must precede the others!)
292071d4279SBram Moolenaar"  vimEscapeBrace handles ["]  []"] (ie. "s don't terminate string inside [])
293d68071d8SBram Moolenaarsyn region	vimEscapeBrace	oneline   contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
294071d4279SBram Moolenaarsyn match	vimPatSepErr	contained	"\\)"
295071d4279SBram Moolenaarsyn match	vimPatSep	contained	"\\|"
296383f9bc3SBram Moolenaarsyn region	vimPatSepZone	oneline   contained   matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\]['"]"	contains=@vimStringGroup
297383f9bc3SBram Moolenaarsyn region	vimPatRegion	contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)"	contains=@vimSubstList oneline
298071d4279SBram Moolenaarsyn match	vimNotPatSep	contained	"\\\\"
2999964e468SBram Moolenaarsyn cluster	vimStringGroup	contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
3009da7ff70SBram Moolenaarsyn region	vimString	oneline keepend	start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+	contains=@vimStringGroup
3019da7ff70SBram Moolenaarsyn region	vimString	oneline keepend	start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+
302071d4279SBram Moolenaarsyn region	vimString	oneline	start=+=!+lc=1	skip=+\\\\\|\\!+ end=+!+	contains=@vimStringGroup
303071d4279SBram Moolenaarsyn region	vimString	oneline	start="=+"lc=1	skip="\\\\\|\\+" end="+"	contains=@vimStringGroup
304071d4279SBram Moolenaarsyn region	vimString	oneline	start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/"	contains=@vimStringGroup
305071d4279SBram Moolenaarsyn match	vimString	contained	+"[^"]*\\$+	skipnl nextgroup=vimStringCont
306071d4279SBram Moolenaarsyn match	vimStringCont	contained	+\(\\\\\|.\)\{-}[^\\]"+
307071d4279SBram Moolenaar
308cfbc5ee4SBram Moolenaar" Substitutions: {{{2
309071d4279SBram Moolenaar" =============
310071d4279SBram Moolenaarsyn cluster	vimSubstList	contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
311071d4279SBram Moolenaarsyn cluster	vimSubstRepList	contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
312071d4279SBram Moolenaarsyn cluster	vimSubstList	add=vimCollection
3139da7ff70SBram Moolenaarsyn match	vimSubst	"\(:\+\s*\|^\s*\||\s*\)\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[:[:alpha:]]\@!" nextgroup=vimSubstPat
314e0fa3742SBram Moolenaarsyn match	vimSubst	"\%(^\|[^\\]\)s\%[ubstitute][:#[:alpha:]]\@!"	nextgroup=vimSubstPat contained
315071d4279SBram Moolenaarsyn match	vimSubst	"/\zss\%[ubstitute]\ze/"	nextgroup=vimSubstPat
316071d4279SBram Moolenaarsyn match	vimSubst1       contained	"s\%[ubstitute]\>"	nextgroup=vimSubstPat
317071d4279SBram Moolenaarsyn 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
318071d4279SBram Moolenaarsyn region	vimSubstRep4    contained	matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList	nextgroup=vimSubstFlagErr	oneline
319071d4279SBram Moolenaarsyn region	vimCollection   contained transparent	start="\\\@<!\[" skip="\\\[" end="\]"	contains=vimCollClass
320071d4279SBram Moolenaarsyn match	vimCollClassErr contained	"\[:.\{-\}:\]"
321071d4279SBram Moolenaarsyn match	vimCollClass    contained transparent	"\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]"
322071d4279SBram Moolenaarsyn match	vimSubstSubstr  contained	"\\z\=\d"
323071d4279SBram Moolenaarsyn match	vimSubstTwoBS   contained	"\\\\"
324a5792f58SBram Moolenaarsyn match	vimSubstFlagErr contained	"[^< \t\r|]\+" contains=vimSubstFlags
325071d4279SBram Moolenaarsyn match	vimSubstFlags   contained	"[&cegiIpr]\+"
326071d4279SBram Moolenaar
327cfbc5ee4SBram Moolenaar" 'String': {{{2
3288b6144bdSBram Moolenaarsyn match	vimString	"[^(,]'[^']\{-}\zs'"
329071d4279SBram Moolenaar
330cfbc5ee4SBram Moolenaar" Marks, Registers, Addresses, Filters: {{{2
331071d4279SBram Moolenaarsyn match	vimMark	"'[a-zA-Z0-9]\ze[-+,!]"	nextgroup=vimOper,vimMarkNumber,vimSubst
332071d4279SBram Moolenaarsyn match	vimMark	"'[<>]\ze[-+,!]"		nextgroup=vimOper,vimMarkNumber,vimSubst
333071d4279SBram Moolenaarsyn match	vimMark	",\zs'[<>]\ze"		nextgroup=vimOper,vimMarkNumber,vimSubst
334071d4279SBram Moolenaarsyn match	vimMark	"[!,:]\zs'[a-zA-Z0-9]"	nextgroup=vimOper,vimMarkNumber,vimSubst
335071d4279SBram Moolenaarsyn match	vimMark	"\<norm\%[al]\s\zs'[a-zA-Z0-9]"	nextgroup=vimOper,vimMarkNumber,vimSubst
336071d4279SBram Moolenaarsyn match	vimMarkNumber	"[-+]\d\+"		nextgroup=vimSubst contained contains=vimOper
337071d4279SBram Moolenaarsyn match	vimPlainMark contained	"'[a-zA-Z0-9]"
338071d4279SBram Moolenaar
339b4ff518dSBram Moolenaarsyn match	vimRegister	'[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
3405b8d8fdbSBram Moolenaarsyn match	vimRegister	'\<norm\s\+\zs"[a-zA-Z0-9]'
3415b8d8fdbSBram Moolenaarsyn match	vimRegister	'\<normal\s\+\zs"[a-zA-Z0-9]'
342cfbc5ee4SBram Moolenaarsyn match	vimRegister	'@"'
343071d4279SBram Moolenaarsyn match	vimPlainRegister contained	'"[a-zA-Z0-9\-:.%#*+=]'
344071d4279SBram Moolenaar
3455b8d8fdbSBram Moolenaarsyn match	vimAddress	",\zs[.$]"	skipwhite nextgroup=vimSubst1
3465b8d8fdbSBram Moolenaarsyn match	vimAddress	"%\ze\a"	skipwhite nextgroup=vimString,vimSubst1
347071d4279SBram Moolenaar
348071d4279SBram Moolenaarsyn match	vimFilter contained	"^!.\{-}\(|\|$\)"		contains=vimSpecFile
349d960d76dSBram Moolenaarsyn match	vimFilter contained	"\A!.\{-}\(|\|$\)"ms=s+1	contains=vimSpecFile,vimFunction,vimFuncName,vimOperParen
350071d4279SBram Moolenaar
351cfbc5ee4SBram Moolenaar" Complex repeats (:h complex-repeat) {{{2
3526be7f873SBram Moolenaarsyn match	vimCmplxRepeat	'[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
3536be7f873SBram Moolenaarsyn match	vimCmplxRepeat	'@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
354071d4279SBram Moolenaar
355cfbc5ee4SBram Moolenaar" Set command and associated set-options (vimOptions) with comment {{{2
35674cbdf03SBram Moolenaarsyn region	vimSet		matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
3579da7ff70SBram Moolenaarsyn region	vimSetEqual	contained	start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
358071d4279SBram Moolenaarsyn region	vimSetString	contained	start=+="+hs=s+1	skip=+\\\\\|\\"+  end=+"+	contains=vimCtrlChar
359b4ff518dSBram Moolenaarsyn match	vimSetSep	contained	"[,:]" skipwhite nextgroup=vimCommand
3605c73622aSBram Moolenaarsyn match	vimSetMod	contained	"&vim\=\|[!&?<]\|all&"
361071d4279SBram Moolenaar
362cfbc5ee4SBram Moolenaar" Let {{{2
363071d4279SBram Moolenaar" ===
3645c73622aSBram Moolenaarsyn keyword	vimLet	let	unl[et]	skipwhite nextgroup=vimVar,vimFuncVar
365071d4279SBram Moolenaar
366e37d50a5SBram Moolenaar" Abbreviations {{{2
367e37d50a5SBram Moolenaar" =============
368e37d50a5SBram Moolenaarsyn keyword vimAbb	ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs
369e37d50a5SBram Moolenaar
370cfbc5ee4SBram Moolenaar" Autocmd {{{2
371071d4279SBram Moolenaar" =======
372071d4279SBram Moolenaarsyn match	vimAutoEventList	contained	"\(!\s\+\)\=\(\a\+,\)*\a\+"	contains=vimAutoEvent nextgroup=vimAutoCmdSpace
373071d4279SBram Moolenaarsyn match	vimAutoCmdSpace	contained	"\s\+"	nextgroup=vimAutoCmdSfxList
374071d4279SBram Moolenaarsyn match	vimAutoCmdSfxList	contained	"\S*"
375071d4279SBram Moolenaarsyn keyword	vimAutoCmd	au[tocmd] do[autocmd] doautoa[ll]	skipwhite nextgroup=vimAutoEventList
376071d4279SBram Moolenaar
377cfbc5ee4SBram Moolenaar" Echo and Execute -- prefer strings! {{{2
378071d4279SBram Moolenaar" ================
3795c73622aSBram Moolenaarsyn region	vimEcho	oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar
3805c73622aSBram Moolenaarsyn region	vimExecute	oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar
381071d4279SBram Moolenaarsyn match	vimEchoHL	"echohl\="	skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone
382071d4279SBram Moolenaarsyn case ignore
383071d4279SBram Moolenaarsyn keyword	vimEchoHLNone	none
384071d4279SBram Moolenaarsyn case match
385071d4279SBram Moolenaar
386cfbc5ee4SBram Moolenaar" Maps {{{2
387071d4279SBram Moolenaar" ====
3883577c6faSBram Moolenaarsyn match	vimMap		"\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
3895c73622aSBram Moolenaarsyn keyword	vimMap		cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
39081af9250SBram Moolenaarsyn keyword	vimMap		mapc[lear] smapc[lear]
3915c73622aSBram Moolenaarsyn keyword	vimUnmap		cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
392b8a7b560SBram Moolenaarsyn match	vimMapLhs	contained	"\S\+"			contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
393b8a7b560SBram Moolenaarsyn match	vimMapBang	contained	"!"			skipwhite nextgroup=vimMapMod,vimMapLhs
394b4ff518dSBram Moolenaarsyn match	vimMapMod	contained	"\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
395b8a7b560SBram Moolenaarsyn match	vimMapRhs	contained	".*" contains=vimNotation,vimCtrlChar	skipnl nextgroup=vimMapRhsExtend
396b4ff518dSBram Moolenaarsyn match	vimMapRhsExtend	contained	"^\s*\\.*$"			contains=vimContinue
397071d4279SBram Moolenaarsyn case ignore
398b4ff518dSBram Moolenaarsyn keyword	vimMapModKey	contained	buffer	expr	leader	localleader	nowait	plug	script	sid	silent	unique
399071d4279SBram Moolenaarsyn case match
400071d4279SBram Moolenaar
401cfbc5ee4SBram Moolenaar" Menus {{{2
402071d4279SBram Moolenaar" =====
403071d4279SBram Moolenaarsyn cluster	vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod
404071d4279SBram Moolenaarsyn 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
405071d4279SBram Moolenaarsyn match	vimMenuName	"[^ \t\\<]\+"	contained nextgroup=vimMenuNameMore,vimMenuMap
406071d4279SBram Moolenaarsyn match	vimMenuPriority	"\d\+\(\.\d\+\)*"	contained skipwhite nextgroup=vimMenuName
407071d4279SBram Moolenaarsyn match	vimMenuNameMore	"\c\\\s\|<tab>\|\\\."	contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation
408071d4279SBram Moolenaarsyn match	vimMenuMod    contained	"\c<\(script\|silent\)\+>"  skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList
409071d4279SBram Moolenaarsyn match	vimMenuMap	"\s"	contained skipwhite nextgroup=vimMenuRhs
410071d4279SBram Moolenaarsyn match	vimMenuRhs	".*$"	contained contains=vimString,vimComment,vimIsCommand
411071d4279SBram Moolenaarsyn match	vimMenuBang	"!"	contained skipwhite nextgroup=@vimMenuList
412071d4279SBram Moolenaar
413cfbc5ee4SBram Moolenaar" Angle-Bracket Notation (tnx to Michael Geddes) {{{2
414071d4279SBram Moolenaar" ======================
415071d4279SBram Moolenaarsyn case ignore
41683d1b190SBram Moolenaarsyn 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\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
417071d4279SBram Moolenaarsyn match	vimNotation	"\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>"	contains=vimBracket
418071d4279SBram Moolenaarsyn match	vimNotation	"\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>"		contains=vimBracket
419071d4279SBram Moolenaarsyn match	vimNotation	'\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1			contains=vimBracket
420d68071d8SBram Moolenaarsyn match	vimNotation	'\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|f-args\|lt\)>'	contains=vimBracket
421071d4279SBram Moolenaarsyn match	vimNotation	"\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>"		contains=vimBracket
422071d4279SBram Moolenaarsyn match	vimBracket contained	"[\\<>]"
423071d4279SBram Moolenaarsyn case match
424071d4279SBram Moolenaar
4253577c6faSBram Moolenaar" User Function Highlighting {{{2
4263577c6faSBram Moolenaar" (following Gautam Iyer's suggestion)
427071d4279SBram Moolenaar" ==========================
428a0f849eeSBram Moolenaarsyn match vimFunc		"\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*("		contains=vimFuncName,vimUserFunc,vimExecute
429a0f849eeSBram Moolenaarsyn match vimUserFunc contained	"\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>"	contains=vimNotation
4305c73622aSBram Moolenaarsyn match vimNotFunc	"\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>"
431071d4279SBram Moolenaar
4323577c6faSBram Moolenaar" Errors And Warnings: {{{2
4333577c6faSBram Moolenaar" ====================
4346be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
4355c73622aSBram Moolenaar syn match	vimFunctionError	"\s\zs[a-z0-9]\i\{-}\ze\s*("			contained contains=vimFuncKey,vimFuncBlank
4365c73622aSBram Moolenaar" syn match	vimFunctionError	"\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*("	contained contains=vimFuncKey,vimFuncBlank
4373577c6faSBram Moolenaar syn match	vimElseIfErr	"\<else\s\+if\>"
4383577c6faSBram Moolenaar syn match	vimBufnrWarn	/\<bufnr\s*(\s*["']\.['"]\s*)/
4393577c6faSBram Moolenaarendif
4403577c6faSBram Moolenaar
4413577c6faSBram Moolenaar" Norm {{{2
44205159a0cSBram Moolenaar" ====
44305159a0cSBram Moolenaarsyn match	vimNorm		"\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds
44405159a0cSBram Moolenaarsyn match	vimNormCmds contained	".*$"
44505159a0cSBram Moolenaar
446cfbc5ee4SBram Moolenaar" Syntax {{{2
447071d4279SBram Moolenaar"=======
448071d4279SBram Moolenaarsyn match	vimGroupList	contained	"@\=[^ \t,]*"	contains=vimGroupSpecial,vimPatSep
449071d4279SBram Moolenaarsyn match	vimGroupList	contained	"@\=[^ \t,]*,"	nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep
4505c73622aSBram Moolenaarsyn keyword	vimGroupSpecial	contained	ALL	ALLBUT	CONTAINED	TOP
4516be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror")
452071d4279SBram Moolenaar syn match	vimSynError	contained	"\i\+"
453071d4279SBram Moolenaar syn match	vimSynError	contained	"\i\+="	nextgroup=vimGroupList
454cfbc5ee4SBram Moolenaarendif
455071d4279SBram Moolenaarsyn match	vimSynContains	contained	"\<contain\(s\|edin\)="	nextgroup=vimGroupList
456071d4279SBram Moolenaarsyn match	vimSynKeyContainedin	contained	"\<containedin="	nextgroup=vimGroupList
457071d4279SBram Moolenaarsyn match	vimSynNextgroup	contained	"nextgroup="	nextgroup=vimGroupList
458071d4279SBram Moolenaar
459071d4279SBram Moolenaarsyn match	vimSyntax	"\<sy\%[ntax]\>"	contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
460071d4279SBram Moolenaarsyn match	vimAuSyntax	contained	"\s+sy\%[ntax]"	contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
461d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSyntax
462071d4279SBram Moolenaar
463cfbc5ee4SBram Moolenaar" Syntax: case {{{2
464071d4279SBram Moolenaarsyn keyword	vimSynType	contained	case	skipwhite nextgroup=vimSynCase,vimSynCaseError
4656be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror")
466071d4279SBram Moolenaar syn match	vimSynCaseError	contained	"\i\+"
467cfbc5ee4SBram Moolenaarendif
468071d4279SBram Moolenaarsyn keyword	vimSynCase	contained	ignore	match
469071d4279SBram Moolenaar
470cfbc5ee4SBram Moolenaar" Syntax: clear {{{2
471071d4279SBram Moolenaarsyn keyword	vimSynType	contained	clear	skipwhite nextgroup=vimGroupList
472071d4279SBram Moolenaar
473cfbc5ee4SBram Moolenaar" Syntax: cluster {{{2
474071d4279SBram Moolenaarsyn keyword	vimSynType	contained	cluster	skipwhite nextgroup=vimClusterName
475a0f849eeSBram Moolenaarsyn region	vimClusterName	contained	matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
476071d4279SBram Moolenaarsyn match	vimGroupAdd	contained	"add="	nextgroup=vimGroupList
477071d4279SBram Moolenaarsyn match	vimGroupRem	contained	"remove="	nextgroup=vimGroupList
478d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
479071d4279SBram Moolenaar
48013d5aeefSBram Moolenaar" Syntax: iskeyword {{{2
48113d5aeefSBram Moolenaarsyn keyword	vimSynType	contained	iskeyword	skipwhite nextgroup=vimIskList
48213d5aeefSBram Moolenaarsyn match	vimIskList	contained	'\S\+'	contains=vimIskSep
48313d5aeefSBram Moolenaarsyn match	vimIskSep	contained	','
48413d5aeefSBram Moolenaar
485cfbc5ee4SBram Moolenaar" Syntax: include {{{2
486071d4279SBram Moolenaarsyn keyword	vimSynType	contained	include	skipwhite nextgroup=vimGroupList
487d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType
488071d4279SBram Moolenaar
489cfbc5ee4SBram Moolenaar" Syntax: keyword {{{2
490071d4279SBram Moolenaarsyn cluster	vimSynKeyGroup	contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
491071d4279SBram Moolenaarsyn keyword	vimSynType	contained	keyword	skipwhite nextgroup=vimSynKeyRegion
492a0f849eeSBram Moolenaarsyn region	vimSynKeyRegion	contained oneline keepend	matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
493071d4279SBram Moolenaarsyn match	vimSynKeyOpt	contained	"\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
494d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType
495071d4279SBram Moolenaar
496cfbc5ee4SBram Moolenaar" Syntax: match {{{2
497071d4279SBram Moolenaarsyn cluster	vimSynMtchGroup	contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
498071d4279SBram Moolenaarsyn keyword	vimSynType	contained	match	skipwhite nextgroup=vimSynMatchRegion
499a0f849eeSBram Moolenaarsyn region	vimSynMatchRegion	contained keepend	matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
500071d4279SBram Moolenaarsyn match	vimSynMtchOpt	contained	"\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
501071d4279SBram Moolenaarif has("conceal")
50283d1b190SBram Moolenaar syn match	vimSynMtchOpt	contained	"\<cchar="	nextgroup=vimSynMtchCchar
5035c73622aSBram Moolenaar syn match	vimSynMtchCchar	contained	"\S"
504071d4279SBram Moolenaarendif
505d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynMtchGroup
506071d4279SBram Moolenaar
507cfbc5ee4SBram Moolenaar" Syntax: off and on {{{2
508071d4279SBram Moolenaarsyn keyword	vimSynType	contained	enable	list	manual	off	on	reset
509071d4279SBram Moolenaar
510cfbc5ee4SBram Moolenaar" Syntax: region {{{2
511071d4279SBram Moolenaarsyn cluster	vimSynRegPatGroup	contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
512071d4279SBram Moolenaarsyn cluster	vimSynRegGroup	contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
513071d4279SBram Moolenaarsyn keyword	vimSynType	contained	region	skipwhite nextgroup=vimSynRegion
514a0f849eeSBram Moolenaarsyn region	vimSynRegion	contained keepend	matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
515071d4279SBram Moolenaarsyn match	vimSynRegOpt	contained	"\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
516071d4279SBram Moolenaarsyn match	vimSynReg	contained	"\(start\|skip\|end\)="he=e-1	nextgroup=vimSynRegPat
517071d4279SBram Moolenaarsyn match	vimSynMtchGrp	contained	"matchgroup="	nextgroup=vimGroup,vimHLGroup
518071d4279SBram Moolenaarsyn region	vimSynRegPat	contained extend	start="\z([-`~!@#$%^&*_=+;:'",./?]\)"  skip="\\\\\|\\\z1"  end="\z1"  contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
519071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
520071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
521071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"lc=\d\+"
522071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"lc=\d\+," nextgroup=vimSynPatMod
523071d4279SBram Moolenaarsyn region	vimSynPatRange	contained	start="\["	skip="\\\\\|\\]"   end="]"
524071d4279SBram Moolenaarsyn match	vimSynNotPatRange	contained	"\\\\\|\\\["
525071d4279SBram Moolenaarsyn match	vimMtchComment	contained	'"[^"]\+$'
526d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType
527071d4279SBram Moolenaar
528cfbc5ee4SBram Moolenaar" Syntax: sync {{{2
529071d4279SBram Moolenaar" ============
530df177f67SBram Moolenaarsyn keyword vimSynType	contained	sync	skipwhite	nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion
5316be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror")
532071d4279SBram Moolenaar syn match	vimSyncError	contained	"\i\+"
533cfbc5ee4SBram Moolenaarendif
534071d4279SBram Moolenaarsyn keyword	vimSyncC	contained	ccomment	clear	fromstart
535071d4279SBram Moolenaarsyn keyword	vimSyncMatch	contained	match	skipwhite	nextgroup=vimSyncGroupName
536071d4279SBram Moolenaarsyn keyword	vimSyncRegion	contained	region	skipwhite	nextgroup=vimSynReg
537df177f67SBram Moolenaarsyn match	vimSyncLinebreak	contained	"\<linebreaks="	skipwhite	nextgroup=vimNumber
538071d4279SBram Moolenaarsyn keyword	vimSyncLinecont	contained	linecont	skipwhite	nextgroup=vimSynRegPat
539071d4279SBram Moolenaarsyn match	vimSyncLines	contained	"\(min\|max\)\=lines="	nextgroup=vimNumber
540a0f849eeSBram Moolenaarsyn match	vimSyncGroupName	contained	"\h\w*"	skipwhite	nextgroup=vimSyncKey
541071d4279SBram Moolenaarsyn match	vimSyncKey	contained	"\<groupthere\|grouphere\>"	skipwhite nextgroup=vimSyncGroup
542a0f849eeSBram Moolenaarsyn match	vimSyncGroup	contained	"\h\w*"	skipwhite	nextgroup=vimSynRegPat,vimSyncNone
543071d4279SBram Moolenaarsyn keyword	vimSyncNone	contained	NONE
544071d4279SBram Moolenaar
545cfbc5ee4SBram Moolenaar" Additional IsCommand, here by reasons of precedence {{{2
546071d4279SBram Moolenaar" ====================
547071d4279SBram Moolenaarsyn match	vimIsCommand	"<Bar>\s*\a\+"	transparent contains=vimCommand,vimNotation
548071d4279SBram Moolenaar
549cfbc5ee4SBram Moolenaar" Highlighting {{{2
550071d4279SBram Moolenaar" ============
551071d4279SBram Moolenaarsyn cluster	vimHighlightCluster		contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment
5526be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
5536be7f873SBram Moolenaar syn match	vimHiCtermError	contained	"[^0-9]\i*"
5546be7f873SBram Moolenaarendif
555071d4279SBram Moolenaarsyn match	vimHighlight	"\<hi\%[ghlight]\>"	skipwhite nextgroup=vimHiBang,@vimHighlightCluster
556071d4279SBram Moolenaarsyn match	vimHiBang	contained	"!"	skipwhite nextgroup=@vimHighlightCluster
557071d4279SBram Moolenaar
558071d4279SBram Moolenaarsyn match	vimHiGroup	contained	"\i\+"
559071d4279SBram Moolenaarsyn case ignore
5604770d09aSBram Moolenaarsyn keyword	vimHiAttrib	contained	none bold inverse italic reverse standout underline undercurl
561071d4279SBram Moolenaarsyn keyword	vimFgBgAttrib	contained	none bg background fg foreground
562071d4279SBram Moolenaarsyn case match
563071d4279SBram Moolenaarsyn match	vimHiAttribList	contained	"\i\+"	contains=vimHiAttrib
564071d4279SBram Moolenaarsyn match	vimHiAttribList	contained	"\i\+,"he=e-1	contains=vimHiAttrib nextgroup=vimHiAttribList
565071d4279SBram Moolenaarsyn case ignore
5666be7f873SBram Moolenaarsyn 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
5676be7f873SBram Moolenaarsyn match	vimHiCtermColor	contained	"\<color\d\{1,3}\>"
568071d4279SBram Moolenaar
569071d4279SBram Moolenaarsyn case match
570071d4279SBram Moolenaarsyn match	vimHiFontname	contained	"[a-zA-Z\-*]\+"
571071d4279SBram Moolenaarsyn match	vimHiGuiFontname	contained	"'[a-zA-Z\-* ]\+'"
572071d4279SBram Moolenaarsyn match	vimHiGuiRgb	contained	"#\x\{6}"
573071d4279SBram Moolenaar
574cfbc5ee4SBram Moolenaar" Highlighting: hi group key=arg ... {{{2
5755c73622aSBram Moolenaarsyn cluster	vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation
576071d4279SBram Moolenaarsyn region	vimHiKeyList	contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||"	contains=@vimHiCluster
5776be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror")
578071d4279SBram Moolenaar syn match	vimHiKeyError	contained	"\i\+="he=e-1
579cfbc5ee4SBram Moolenaarendif
580071d4279SBram Moolenaarsyn match	vimHiTerm	contained	"\cterm="he=e-1		nextgroup=vimHiAttribList
581071d4279SBram Moolenaarsyn match	vimHiStartStop	contained	"\c\(start\|stop\)="he=e-1	nextgroup=vimHiTermcap,vimOption
582071d4279SBram Moolenaarsyn match	vimHiCTerm	contained	"\ccterm="he=e-1		nextgroup=vimHiAttribList
58383d1b190SBram Moolenaarsyn match	vimHiCtermFgBg	contained	"\ccterm[fb]g="he=e-1	nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
584071d4279SBram Moolenaarsyn match	vimHiGui	contained	"\cgui="he=e-1		nextgroup=vimHiAttribList
585071d4279SBram Moolenaarsyn match	vimHiGuiFont	contained	"\cfont="he=e-1		nextgroup=vimHiFontname
5864770d09aSBram Moolenaarsyn match	vimHiGuiFgBg	contained	"\cgui\%([fb]g\|sp\)="he=e-1	nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
587071d4279SBram Moolenaarsyn match	vimHiTermcap	contained	"\S\+"		contains=vimNotation
58883d1b190SBram Moolenaarsyn match	vimHiNmbr	contained	'\d\+'
589071d4279SBram Moolenaar
590cfbc5ee4SBram Moolenaar" Highlight: clear {{{2
591071d4279SBram Moolenaarsyn keyword	vimHiClear	contained	clear	nextgroup=vimHiGroup
592071d4279SBram Moolenaar
593cfbc5ee4SBram Moolenaar" Highlight: link {{{2
59483d1b190SBram Moolenaarsyn region	vimHiLink	contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$"	contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
595d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimHiLink
596071d4279SBram Moolenaar
597cfbc5ee4SBram Moolenaar" Control Characters {{{2
598071d4279SBram Moolenaar" ==================
599071d4279SBram Moolenaarsyn match	vimCtrlChar	"[--]"
600071d4279SBram Moolenaar
601cfbc5ee4SBram Moolenaar" Beginners - Patterns that involve ^ {{{2
602071d4279SBram Moolenaar" =========
603071d4279SBram Moolenaarsyn match	vimLineComment	+^[ \t:]*".*$+	contains=@vimCommentGroup,vimCommentString,vimCommentTitle
604ff1d0d4cSBram Moolenaarsyn match	vimCommentTitle	'"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1	contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
605071d4279SBram Moolenaarsyn match	vimContinue	"^\s*\\"
606071d4279SBram Moolenaarsyn region	vimString	start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
607071d4279SBram Moolenaarsyn match	vimCommentTitleLeader	'"\s\+'ms=s+1	contained
608071d4279SBram Moolenaar
60918144c84SBram Moolenaar" Searches And Globals: {{{2
61018144c84SBram Moolenaar" ====================
611e2f98b95SBram Moolenaarsyn match	vimSearch	'^\s*[/?].*'		contains=vimSearchDelim
612e2f98b95SBram Moolenaarsyn match	vimSearchDelim	'^\s*\zs[/?]\|[/?]$'	contained
6139da7ff70SBram Moolenaarsyn region	vimGlobal	matchgroup=Statement start='\<g\%[lobal]!\=/'  skip='\\.' end='/'	skipwhite nextgroup=vimSubst
6149da7ff70SBram Moolenaarsyn region	vimGlobal	matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/'	skipwhite nextgroup=vimSubst
615e2f98b95SBram Moolenaar
616cfbc5ee4SBram Moolenaar" Scripts  : perl,ruby : Benoit Cerrina {{{2
617071d4279SBram Moolenaar" =======    python,tcl: Johannes Zellner
6184b22cdb0SBram Moolenaar"            lua
619071d4279SBram Moolenaar
6203577c6faSBram Moolenaar" Allows users to specify the type of embedded script highlighting
6213577c6faSBram Moolenaar" they want:  (perl/python/ruby/tcl support)
6223577c6faSBram Moolenaar"   g:vimsyn_embed == 0   : don't embed any scripts
623f391327aSBram Moolenaar"   g:vimsyn_embed =~# 'l' : embed lua      (but only if vim supports it)
624f391327aSBram Moolenaar"   g:vimsyn_embed =~# 'm' : embed mzscheme (but only if vim supports it)
625f391327aSBram Moolenaar"   g:vimsyn_embed =~# 'p' : embed perl     (but only if vim supports it)
626f391327aSBram Moolenaar"   g:vimsyn_embed =~# 'P' : embed python   (but only if vim supports it)
627f391327aSBram Moolenaar"   g:vimsyn_embed =~# 'r' : embed ruby     (but only if vim supports it)
628f391327aSBram Moolenaar"   g:vimsyn_embed =~# 't' : embed tcl      (but only if vim supports it)
6297cba6c06SBram Moolenaarif !exists("g:vimsyn_embed")
630a0f849eeSBram Moolenaar let g:vimsyn_embed= "lmpPr"
6317cba6c06SBram Moolenaarendif
632071d4279SBram Moolenaar
6334b22cdb0SBram Moolenaar" [-- lua --] {{{3
634adc2182cSBram Moolenaarlet s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim")
6354b22cdb0SBram Moolenaarif !filereadable(s:luapath)
636a0f849eeSBram Moolenaar for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n")
637a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:luapath))
638a0f849eeSBram Moolenaar   let s:luapath= fnameescape(s:luapath)
6399da7ff70SBram Moolenaar   break
6409da7ff70SBram Moolenaar  endif
6419da7ff70SBram Moolenaar endfor
6424b22cdb0SBram Moolenaarendif
643f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath)
6444b22cdb0SBram Moolenaar unlet! b:current_syntax
6454b22cdb0SBram Moolenaar exe "syn include @vimLuaScript ".s:luapath
646a0f849eeSBram Moolenaar VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimLuaScript
647a0f849eeSBram Moolenaar VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+		contains=@vimLuaScript
6484b22cdb0SBram Moolenaar syn cluster vimFuncBodyList	add=vimLuaRegion
6494b22cdb0SBram Moolenaarelse
6504b22cdb0SBram Moolenaar syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+
6514b22cdb0SBram Moolenaar syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+
6524b22cdb0SBram Moolenaarendif
6534b22cdb0SBram Moolenaarunlet s:luapath
6544b22cdb0SBram Moolenaar
655cfbc5ee4SBram Moolenaar" [-- perl --] {{{3
656adc2182cSBram Moolenaarlet s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim")
6575c73622aSBram Moolenaarif !filereadable(s:perlpath)
658a0f849eeSBram Moolenaar for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n")
659a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:perlpath))
660a0f849eeSBram Moolenaar   let s:perlpath= fnameescape(s:perlpath)
6619da7ff70SBram Moolenaar   break
6629da7ff70SBram Moolenaar  endif
6639da7ff70SBram Moolenaar endfor
6645c73622aSBram Moolenaarendif
665f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'p' && has("perl")) && filereadable(s:perlpath)
666071d4279SBram Moolenaar unlet! b:current_syntax
6675c73622aSBram Moolenaar exe "syn include @vimPerlScript ".s:perlpath
668a0f849eeSBram Moolenaar VimFoldp syn region vimPerlRegion  matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimPerlScript
669a0f849eeSBram Moolenaar VimFoldp syn region vimPerlRegion	matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+	contains=@vimPerlScript
6705c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimPerlRegion
671c236c16dSBram Moolenaarelse
672c236c16dSBram Moolenaar syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+
673c236c16dSBram Moolenaar syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+
6743577c6faSBram Moolenaarendif
6755c73622aSBram Moolenaarunlet s:perlpath
676071d4279SBram Moolenaar
677cfbc5ee4SBram Moolenaar" [-- ruby --] {{{3
678adc2182cSBram Moolenaarlet s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim")
6795c73622aSBram Moolenaarif !filereadable(s:rubypath)
680a0f849eeSBram Moolenaar for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n")
681a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:rubypath))
682a0f849eeSBram Moolenaar   let s:rubypath= fnameescape(s:rubypath)
6839da7ff70SBram Moolenaar   break
6849da7ff70SBram Moolenaar  endif
6859da7ff70SBram Moolenaar endfor
6865c73622aSBram Moolenaarendif
687f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'r' && has("ruby")) && filereadable(s:rubypath)
688071d4279SBram Moolenaar unlet! b:current_syntax
6895c73622aSBram Moolenaar exe "syn include @vimRubyScript ".s:rubypath
690a0f849eeSBram Moolenaar VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimRubyScript
691071d4279SBram Moolenaar syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+		contains=@vimRubyScript
6925c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimRubyRegion
693c236c16dSBram Moolenaarelse
694c236c16dSBram Moolenaar syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+
695c236c16dSBram Moolenaar syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+
696071d4279SBram Moolenaarendif
6975c73622aSBram Moolenaarunlet s:rubypath
698071d4279SBram Moolenaar
699cfbc5ee4SBram Moolenaar" [-- python --] {{{3
700adc2182cSBram Moolenaarlet s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim")
7015c73622aSBram Moolenaarif !filereadable(s:pythonpath)
702a0f849eeSBram Moolenaar for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n")
703a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:pythonpath))
704a0f849eeSBram Moolenaar   let s:pythonpath= fnameescape(s:pythonpath)
7059da7ff70SBram Moolenaar   break
7065c73622aSBram Moolenaar  endif
7079da7ff70SBram Moolenaar endfor
7089da7ff70SBram Moolenaarendif
709f391327aSBram Moolenaarif g:vimsyn_embed =~# 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath)
710071d4279SBram Moolenaar unlet! b:current_syntax
7115c73622aSBram Moolenaar exe "syn include @vimPythonScript ".s:pythonpath
712a0f849eeSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimPythonScript
713a0f849eeSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+		contains=@vimPythonScript
714b4ff518dSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+		contains=@vimPythonScript
715b4ff518dSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+		contains=@vimPythonScript
7165c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimPythonRegion
717c236c16dSBram Moolenaarelse
718fa01c39dSBram Moolenaar syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
719fa01c39dSBram Moolenaar syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+
7203577c6faSBram Moolenaarendif
7215c73622aSBram Moolenaarunlet s:pythonpath
722071d4279SBram Moolenaar
723cfbc5ee4SBram Moolenaar" [-- tcl --] {{{3
724a0f849eeSBram Moolenaarif has("win32") || has("win95") || has("win64") || has("win16")
725a0f849eeSBram Moolenaar " apparently has("tcl") has been hanging vim on some windows systems with cygwin
726a0f849eeSBram Moolenaar let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$')
727a0f849eeSBram Moolenaarelse
728a0f849eeSBram Moolenaar let s:trytcl= 1
729a0f849eeSBram Moolenaarendif
730a6878375SBram Moolenaarif s:trytcl
731adc2182cSBram Moolenaar let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim")
7325c73622aSBram Moolenaar if !filereadable(s:tclpath)
733a0f849eeSBram Moolenaar  for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n")
734a0f849eeSBram Moolenaar   if filereadable(fnameescape(s:tclpath))
735a0f849eeSBram Moolenaar    let s:tclpath= fnameescape(s:tclpath)
7369da7ff70SBram Moolenaar    break
7379da7ff70SBram Moolenaar   endif
7389da7ff70SBram Moolenaar  endfor
7395c73622aSBram Moolenaar endif
740f391327aSBram Moolenaar if (g:vimsyn_embed =~# 't' && has("tcl")) && filereadable(s:tclpath)
741071d4279SBram Moolenaar  unlet! b:current_syntax
7425c73622aSBram Moolenaar  exe "syn include @vimTclScript ".s:tclpath
743a0f849eeSBram Moolenaar  VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimTclScript
744a0f849eeSBram Moolenaar  VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+	contains=@vimTclScript
7455c73622aSBram Moolenaar  syn cluster vimFuncBodyList	add=vimTclScript
746c236c16dSBram Moolenaar else
747c236c16dSBram Moolenaar  syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
748c236c16dSBram Moolenaar  syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
7493577c6faSBram Moolenaar endif
7505c73622aSBram Moolenaar unlet s:tclpath
751a6878375SBram Moolenaarelse
752a6878375SBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
753a6878375SBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
754a6878375SBram Moolenaarendif
755a6878375SBram Moolenaarunlet s:trytcl
756071d4279SBram Moolenaar
7578299df96SBram Moolenaar" [-- mzscheme --] {{{3
758adc2182cSBram Moolenaarlet s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim")
7595c73622aSBram Moolenaarif !filereadable(s:mzschemepath)
760a0f849eeSBram Moolenaar for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n")
761a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:mzschemepath))
762a0f849eeSBram Moolenaar   let s:mzschemepath= fnameescape(s:mzschemepath)
7639da7ff70SBram Moolenaar   break
7649da7ff70SBram Moolenaar  endif
7659da7ff70SBram Moolenaar endfor
7665c73622aSBram Moolenaarendif
767f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
7688299df96SBram Moolenaar unlet! b:current_syntax
769*03413f44SBram Moolenaar let s:iskKeep= &isk
7705c73622aSBram Moolenaar exe "syn include @vimMzSchemeScript ".s:mzschemepath
771*03413f44SBram Moolenaar let &isk= s:iskKeep
772*03413f44SBram Moolenaar unlet s:iskKeep
773a0f849eeSBram Moolenaar VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimMzSchemeScript
774a0f849eeSBram Moolenaar VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+		contains=@vimMzSchemeScript
7755c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimMzSchemeRegion
776c236c16dSBram Moolenaarelse
777c236c16dSBram Moolenaar syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+
778c236c16dSBram Moolenaar syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+
7793577c6faSBram Moolenaarendif
7805c73622aSBram Moolenaarunlet s:mzschemepath
7818299df96SBram Moolenaar
782cfbc5ee4SBram Moolenaar" Synchronize (speed) {{{2
783071d4279SBram Moolenaar"============
7843577c6faSBram Moolenaarif exists("g:vimsyn_minlines")
7853577c6faSBram Moolenaar exe "syn sync minlines=".g:vimsyn_minlines
786071d4279SBram Moolenaarendif
787*03413f44SBram Moolenaarexe "syn sync maxlines=".s:vimsyn_maxlines
788071d4279SBram Moolenaarsyn sync linecont	"^\s\+\\"
789071d4279SBram Moolenaarsyn sync match vimAugroupSyncA	groupthere NONE	"\<aug\%[roup]\>\s\+[eE][nN][dD]"
790071d4279SBram Moolenaar
7915c73622aSBram Moolenaar" ====================
792cfbc5ee4SBram Moolenaar" Highlighting Settings {{{2
793071d4279SBram Moolenaar" ====================
794071d4279SBram Moolenaar
7953577c6faSBram Moolenaarif !exists("g:vimsyn_noerror")
796cfbc5ee4SBram Moolenaar hi def link vimBehaveError	vimError
797cfbc5ee4SBram Moolenaar hi def link vimCollClassErr	vimError
798cfbc5ee4SBram Moolenaar hi def link vimErrSetting	vimError
799c236c16dSBram Moolenaar hi def link vimEmbedError	vimError
800cfbc5ee4SBram Moolenaar hi def link vimFTError	vimError
801cfbc5ee4SBram Moolenaar hi def link vimFunctionError	vimError
8028299df96SBram Moolenaar hi def link vimFunc         	vimError
803cfbc5ee4SBram Moolenaar hi def link vimHiAttribList	vimError
804cfbc5ee4SBram Moolenaar hi def link vimHiCtermError	vimError
805cfbc5ee4SBram Moolenaar hi def link vimHiKeyError	vimError
806cfbc5ee4SBram Moolenaar hi def link vimKeyCodeError	vimError
807cfbc5ee4SBram Moolenaar hi def link vimMapModErr	vimError
808cfbc5ee4SBram Moolenaar hi def link vimSubstFlagErr	vimError
809cfbc5ee4SBram Moolenaar hi def link vimSynCaseError	vimError
8103577c6faSBram Moolenaar hi def link vimBufnrWarn	vimWarn
811cfbc5ee4SBram Moolenaarendif
812cfbc5ee4SBram Moolenaar
813e37d50a5SBram Moolenaarhi def link vimAbb	vimCommand
814cfbc5ee4SBram Moolenaarhi def link vimAddress	vimMark
815a0f849eeSBram Moolenaarhi def link vimAugroupError	vimError
816071d4279SBram Moolenaarhi def link vimAugroupKey	vimCommand
81783d1b190SBram Moolenaarhi def link vimAuHighlight	vimHighlight
818071d4279SBram Moolenaarhi def link vimAutoCmdOpt	vimOption
819071d4279SBram Moolenaarhi def link vimAutoCmd	vimCommand
82083d1b190SBram Moolenaarhi def link vimAutoEvent	Type
821071d4279SBram Moolenaarhi def link vimAutoSet	vimCommand
82283d1b190SBram Moolenaarhi def link vimBehaveModel	vimBehave
823071d4279SBram Moolenaarhi def link vimBehave	vimCommand
82483d1b190SBram Moolenaarhi def link vimBracket	Delimiter
82583d1b190SBram Moolenaarhi def link vimCmplxRepeat	SpecialChar
82683d1b190SBram Moolenaarhi def link vimCommand	Statement
82783d1b190SBram Moolenaarhi def link vimComment	Comment
828071d4279SBram Moolenaarhi def link vimCommentString	vimString
82983d1b190SBram Moolenaarhi def link vimCommentTitle	PreProc
830071d4279SBram Moolenaarhi def link vimCondHL	vimCommand
83183d1b190SBram Moolenaarhi def link vimContinue	Special
83283d1b190SBram Moolenaarhi def link vimCtrlChar	SpecialChar
833071d4279SBram Moolenaarhi def link vimEchoHLNone	vimGroup
834071d4279SBram Moolenaarhi def link vimEchoHL	vimCommand
83583d1b190SBram Moolenaarhi def link vimElseIfErr	Error
836071d4279SBram Moolenaarhi def link vimElseif	vimCondHL
83783d1b190SBram Moolenaarhi def link vimEnvvar	PreProc
83883d1b190SBram Moolenaarhi def link vimError	Error
83983d1b190SBram Moolenaarhi def link vimFBVar	vimVar
840071d4279SBram Moolenaarhi def link vimFgBgAttrib	vimHiAttrib
84183d1b190SBram Moolenaarhi def link vimFold	Folded
842071d4279SBram Moolenaarhi def link vimFTCmd	vimCommand
843071d4279SBram Moolenaarhi def link vimFTOption	vimSynType
844071d4279SBram Moolenaarhi def link vimFuncKey	vimCommand
84583d1b190SBram Moolenaarhi def link vimFuncName	Function
84683d1b190SBram Moolenaarhi def link vimFuncSID	Special
84783d1b190SBram Moolenaarhi def link vimFuncVar	Identifier
848071d4279SBram Moolenaarhi def link vimGroupAdd	vimSynOption
8496be7f873SBram Moolenaarhi def link vimGroupName	vimGroup
850071d4279SBram Moolenaarhi def link vimGroupRem	vimSynOption
85183d1b190SBram Moolenaarhi def link vimGroupSpecial	Special
85283d1b190SBram Moolenaarhi def link vimGroup	Type
85383d1b190SBram Moolenaarhi def link vimHiAttrib	PreProc
8546be7f873SBram Moolenaarhi def link vimHiClear	vimHighlight
855071d4279SBram Moolenaarhi def link vimHiCtermFgBg	vimHiTerm
856071d4279SBram Moolenaarhi def link vimHiCTerm	vimHiTerm
857071d4279SBram Moolenaarhi def link vimHighlight	vimCommand
858071d4279SBram Moolenaarhi def link vimHiGroup	vimGroupName
859071d4279SBram Moolenaarhi def link vimHiGuiFgBg	vimHiTerm
860071d4279SBram Moolenaarhi def link vimHiGuiFont	vimHiTerm
861071d4279SBram Moolenaarhi def link vimHiGuiRgb	vimNumber
862071d4279SBram Moolenaarhi def link vimHiGui	vimHiTerm
86383d1b190SBram Moolenaarhi def link vimHiNmbr	Number
864071d4279SBram Moolenaarhi def link vimHiStartStop	vimHiTerm
86583d1b190SBram Moolenaarhi def link vimHiTerm	Type
866071d4279SBram Moolenaarhi def link vimHLGroup	vimGroup
86783d1b190SBram Moolenaarhi def link vimHLMod	PreProc
868071d4279SBram Moolenaarhi def link vimInsert	vimString
86913d5aeefSBram Moolenaarhi def link vimIskSep	Delimiter
870071d4279SBram Moolenaarhi def link vimKeyCode	vimSpecFile
87183d1b190SBram Moolenaarhi def link vimKeyword	Statement
872071d4279SBram Moolenaarhi def link vimLet	vimCommand
873071d4279SBram Moolenaarhi def link vimLineComment	vimComment
874071d4279SBram Moolenaarhi def link vimMapBang	vimCommand
875071d4279SBram Moolenaarhi def link vimMapModKey	vimFuncSID
876071d4279SBram Moolenaarhi def link vimMapMod	vimBracket
877071d4279SBram Moolenaarhi def link vimMap	vimCommand
87883d1b190SBram Moolenaarhi def link vimMark	Number
879071d4279SBram Moolenaarhi def link vimMarkNumber	vimNumber
880071d4279SBram Moolenaarhi def link vimMenuMod	vimMapMod
881071d4279SBram Moolenaarhi def link vimMenuNameMore	vimMenuName
88283d1b190SBram Moolenaarhi def link vimMenuName	PreProc
883071d4279SBram Moolenaarhi def link vimMtchComment	vimComment
88405159a0cSBram Moolenaarhi def link vimNorm	vimCommand
88583d1b190SBram Moolenaarhi def link vimNotation	Special
8865c73622aSBram Moolenaarhi def link vimNotFunc	vimCommand
887071d4279SBram Moolenaarhi def link vimNotPatSep	vimString
88883d1b190SBram Moolenaarhi def link vimNumber	Number
88983d1b190SBram Moolenaarhi def link vimOperError	Error
89083d1b190SBram Moolenaarhi def link vimOper	Operator
89183d1b190SBram Moolenaarhi def link vimOption	PreProc
89283d1b190SBram Moolenaarhi def link vimParenSep	Delimiter
893071d4279SBram Moolenaarhi def link vimPatSepErr	vimPatSep
8945c73622aSBram Moolenaarhi def link vimPatSepR	vimPatSep
89583d1b190SBram Moolenaarhi def link vimPatSep	SpecialChar
896071d4279SBram Moolenaarhi def link vimPatSepZone	vimString
8975c73622aSBram Moolenaarhi def link vimPatSepZ	vimPatSep
89883d1b190SBram Moolenaarhi def link vimPattern	Type
899071d4279SBram Moolenaarhi def link vimPlainMark	vimMark
900071d4279SBram Moolenaarhi def link vimPlainRegister	vimRegister
90183d1b190SBram Moolenaarhi def link vimRegister	SpecialChar
90283d1b190SBram Moolenaarhi def link vimScriptDelim	Comment
90383d1b190SBram Moolenaarhi def link vimSearchDelim	Statement
904e2f98b95SBram Moolenaarhi def link vimSearch	vimString
90583d1b190SBram Moolenaarhi def link vimSep	Delimiter
906071d4279SBram Moolenaarhi def link vimSetMod	vimOption
90783d1b190SBram Moolenaarhi def link vimSetSep	Statement
908071d4279SBram Moolenaarhi def link vimSetString	vimString
90983d1b190SBram Moolenaarhi def link vimSpecFile	Identifier
910071d4279SBram Moolenaarhi def link vimSpecFileMod	vimSpecFile
91183d1b190SBram Moolenaarhi def link vimSpecial	Type
91283d1b190SBram Moolenaarhi def link vimStatement	Statement
913071d4279SBram Moolenaarhi def link vimStringCont	vimString
91483d1b190SBram Moolenaarhi def link vimString	String
91583d1b190SBram Moolenaarhi def link vimSubst1	vimSubst
91683d1b190SBram Moolenaarhi def link vimSubstDelim	Delimiter
91783d1b190SBram Moolenaarhi def link vimSubstFlags	Special
91883d1b190SBram Moolenaarhi def link vimSubstSubstr	SpecialChar
919071d4279SBram Moolenaarhi def link vimSubstTwoBS	vimString
920071d4279SBram Moolenaarhi def link vimSubst	vimCommand
92183d1b190SBram Moolenaarhi def link vimSynCaseError	Error
92283d1b190SBram Moolenaarhi def link vimSynCase	Type
92383d1b190SBram Moolenaarhi def link vimSyncC	Type
92483d1b190SBram Moolenaarhi def link vimSyncError	Error
925071d4279SBram Moolenaarhi def link vimSyncGroupName	vimGroupName
926071d4279SBram Moolenaarhi def link vimSyncGroup	vimGroupName
92783d1b190SBram Moolenaarhi def link vimSyncKey	Type
92883d1b190SBram Moolenaarhi def link vimSyncNone	Type
929071d4279SBram Moolenaarhi def link vimSynContains	vimSynOption
93083d1b190SBram Moolenaarhi def link vimSynError	Error
931071d4279SBram Moolenaarhi def link vimSynKeyContainedin	vimSynContains
932071d4279SBram Moolenaarhi def link vimSynKeyOpt	vimSynOption
933071d4279SBram Moolenaarhi def link vimSynMtchGrp	vimSynOption
934071d4279SBram Moolenaarhi def link vimSynMtchOpt	vimSynOption
935071d4279SBram Moolenaarhi def link vimSynNextgroup	vimSynOption
936071d4279SBram Moolenaarhi def link vimSynNotPatRange	vimSynRegPat
93783d1b190SBram Moolenaarhi def link vimSynOption	Special
938071d4279SBram Moolenaarhi def link vimSynPatRange	vimString
939071d4279SBram Moolenaarhi def link vimSynRegOpt	vimSynOption
940071d4279SBram Moolenaarhi def link vimSynRegPat	vimString
94183d1b190SBram Moolenaarhi def link vimSynReg	Type
942071d4279SBram Moolenaarhi def link vimSyntax	vimCommand
943071d4279SBram Moolenaarhi def link vimSynType	vimSpecial
94483d1b190SBram Moolenaarhi def link vimTodo	Todo
9455c73622aSBram Moolenaarhi def link vimUnmap	vimMap
94683d1b190SBram Moolenaarhi def link vimUserAttrbCmpltFunc	Special
947071d4279SBram Moolenaarhi def link vimUserAttrbCmplt	vimSpecial
948071d4279SBram Moolenaarhi def link vimUserAttrbKey	vimOption
949071d4279SBram Moolenaarhi def link vimUserAttrb	vimSpecial
950b4ff518dSBram Moolenaarhi def link vimUserAttrbError	Error
951e2719096SBram Moolenaarhi def link vimUserCmdError	Error
95283d1b190SBram Moolenaarhi def link vimUserCommand	vimCommand
9535c73622aSBram Moolenaarhi def link vimUserFunc	Normal
9546be7f873SBram Moolenaarhi def link vimVar	Identifier
9553577c6faSBram Moolenaarhi def link vimWarn	WarningMsg
956071d4279SBram Moolenaar
957cfbc5ee4SBram Moolenaar" Current Syntax Variable: {{{2
958071d4279SBram Moolenaarlet b:current_syntax = "vim"
9596be7f873SBram Moolenaar
9606be7f873SBram Moolenaar" ---------------------------------------------------------------------
9616be7f873SBram Moolenaar" Cleanup: {{{1
962a0f849eeSBram Moolenaardelc VimFolda
963a0f849eeSBram Moolenaardelc VimFoldf
964a0f849eeSBram Moolenaardelc VimFoldl
965a0f849eeSBram Moolenaardelc VimFoldm
966a0f849eeSBram Moolenaardelc VimFoldp
967a0f849eeSBram Moolenaardelc VimFoldP
968a0f849eeSBram Moolenaardelc VimFoldr
969a0f849eeSBram Moolenaardelc VimFoldt
9706be7f873SBram Moolenaarlet &cpo = s:keepcpo
9716be7f873SBram Moolenaarunlet s:keepcpo
972071d4279SBram Moolenaar" vim:ts=18  fdm=marker
973