xref: /vim-8.2.3635/runtime/syntax/vim.vim (revision e0fa3742)
1071d4279SBram Moolenaar" Vim syntax file
27cba6c06SBram Moolenaar" Language:	Vim 7.4 script
37cba6c06SBram Moolenaar" Maintainer:	Charles E. Campbell <[email protected]>
4*e0fa3742SBram Moolenaar" Last Change:	February 17, 2016
5*e0fa3742SBram Moolenaar" Version:	7.4-43
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*e0fa3742SBram Moolenaarsyn keyword vimCommand contained	a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cat[ch] ce[nter] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new noswap[file] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
22*e0fa3742SBram Moolenaarsyn keyword vimCommand contained	ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad cb[uffer] cex[pr] cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rundo sav[eas] sbN[ext] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
23*e0fa3742SBram Moolenaarsyn keyword vimCommand contained	abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers caddb[uffer] cc cf cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] ru[ntime] sba[ll] sbp[revious] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
24*e0fa3742SBram Moolenaarsyn keyword vimCommand contained	abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] cad[dexpr] ccl[ose] cfdo c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
25*e0fa3742SBram Moolenaarsyn keyword vimCommand contained	al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] caddf[ile] cd cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
26*e0fa3742SBram Moolenaarsyn keyword vimCommand contained	ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cal[l] cdo cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rubyd[o] san[dbox] sbm[odified] scrip
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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmp comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef 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 paragraphs penc pi 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cms commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm 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 paste perldll pm 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions co compatible consk cpt cscopetag cst cursorline dex digraph ead ei 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 pastetoggle pex pmbcs 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw cocu complete conskey crb cscopetagorder csto cwh dg dip eadirection ek 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 patchexpr pexpr pmbfn 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cole completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb 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 patchmode pfn popt 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard colorcolumn completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed 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 path ph 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cmdheight columns concealcursor cp cscopeprg csprg cul def diff display edcompatible 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 para pdev pheader 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdwinheight com
39071d4279SBram Moolenaar
40071d4279SBram Moolenaar" vimOptions: These are the turn-off setting variants {{{2
41*e0fa3742SBram Moolenaarsyn keyword vimOption contained	noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nogdefault nohidden nohkmapp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable noguipty nohk nohkp noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nogd nohid nohkmap nohls
44071d4279SBram Moolenaar
45071d4279SBram Moolenaar" vimOptions: These are the invertible variants {{{2
46*e0fa3742SBram Moolenaarsyn keyword vimOption contained	invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invgdefault invhidden invhkmapp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invguipty invhk invhkp invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp 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*e0fa3742SBram Moolenaarsyn keyword vimOption contained	invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invgd invhid invhkmap invhls
49071d4279SBram Moolenaar
50071d4279SBram Moolenaar" termcap codes (which can also be set) {{{2
51*e0fa3742SBram 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_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_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
52*e0fa3742SBram Moolenaarsyn keyword vimOption contained	t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da
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
62071d4279SBram Moolenaar" unsupported settings: these are supported by vi but don't do anything in vim {{{2
63cd71fa3cSBram Moolenaarsyn keyword vimErrSetting contained	hardtabs ht w1200 w300 w9600
64071d4279SBram Moolenaar
6580a94a58SBram Moolenaar" AutoCmd Events {{{2
66071d4279SBram Moolenaarsyn case ignore
67a0f849eeSBram 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 Cmd-event 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 UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
68071d4279SBram Moolenaar
69071d4279SBram Moolenaar" Highlight commonly used Groupnames {{{2
70b2c0350cSBram 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
71071d4279SBram Moolenaar
72071d4279SBram Moolenaar" Default highlighting groups {{{2
73a6878375SBram 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
74293ee4d4SBram Moolenaarsyn match vimHLGroup contained	"Conceal"
75071d4279SBram Moolenaarsyn case match
76071d4279SBram Moolenaar
77071d4279SBram Moolenaar" Function Names {{{2
78*e0fa3742SBram Moolenaarsyn keyword vimFuncName contained	abs alloc_fail argc argv assert_exception assert_true browse buflisted bufnr byteidx ceil cindent complete confirm cos cscope_connection delete diff_hlID eval exepath expand 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 jsondecode len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char perleval printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos server2client setcharsearch setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strftime strlen strtrans substitute synIDattr system tabpagenr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth writefile
79*e0fa3742SBram Moolenaarsyn keyword vimFuncName contained	acos and argidx asin assert_fails atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add connect cosh cursor did_filetype empty eventhandler exists expr8 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 items jsonencode libcall line2byte log map match matcharg matchlist min mzeval or pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair sendexpr serverlist setcmdpos setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strchars stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview wordcount xor
80*e0fa3742SBram Moolenaarsyn keyword vimFuncName contained	add append arglistid assert_equal assert_false atan2 bufexists bufname byte2line call char2nr col complete_check copy count deepcopy diff_filler escape executable exp 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 join keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos sendraw setbufvar setline setpos settabvar sha256 simplify sort spellsuggest str2float strdisplaywidth string strridx submatch synID synstack tabpagebuflist tagfiles
81071d4279SBram Moolenaar
82ac7bd638SBram Moolenaar"--- syntax here and above generated by mkvimvim ---
83cfbc5ee4SBram Moolenaar" Special Vim Highlighting (not automatic) {{{1
84071d4279SBram Moolenaar
85a0f849eeSBram Moolenaar" Set up folding commands
86a0f849eeSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~ '[aflmpPrt]'
87a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 'a'
88a0f849eeSBram Moolenaar  com! -nargs=* VimFolda <args> fold
89a0f849eeSBram Moolenaar else
90a0f849eeSBram Moolenaar  com! -nargs=* VimFolda <args>
91a0f849eeSBram Moolenaar endif
92a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 'f'
93a0f849eeSBram Moolenaar  com! -nargs=* VimFoldf <args> fold
94a0f849eeSBram Moolenaar else
95a0f849eeSBram Moolenaar  com! -nargs=* VimFoldf <args>
96a0f849eeSBram Moolenaar endif
97a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 'l'
98a0f849eeSBram Moolenaar  com! -nargs=* VimFoldl <args> fold
99a0f849eeSBram Moolenaar else
100a0f849eeSBram Moolenaar  com! -nargs=* VimFoldl <args>
101a0f849eeSBram Moolenaar endif
102a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 'm'
103a0f849eeSBram Moolenaar  com! -nargs=* VimFoldm <args> fold
104a0f849eeSBram Moolenaar else
105a0f849eeSBram Moolenaar  com! -nargs=* VimFoldm <args>
106a0f849eeSBram Moolenaar endif
107a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 'p'
108a0f849eeSBram Moolenaar  com! -nargs=* VimFoldp <args> fold
109a0f849eeSBram Moolenaar else
110a0f849eeSBram Moolenaar  com! -nargs=* VimFoldp <args>
111a0f849eeSBram Moolenaar endif
112a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 'P'
113a0f849eeSBram Moolenaar  com! -nargs=* VimFoldP <args> fold
114a0f849eeSBram Moolenaar else
115a0f849eeSBram Moolenaar  com! -nargs=* VimFoldP <args>
116a0f849eeSBram Moolenaar endif
117a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 'r'
118a0f849eeSBram Moolenaar  com! -nargs=* VimFoldr <args> fold
119a0f849eeSBram Moolenaar else
120a0f849eeSBram Moolenaar  com! -nargs=* VimFoldr <args>
121a0f849eeSBram Moolenaar endif
122a0f849eeSBram Moolenaar if g:vimsyn_folding =~ 't'
123a0f849eeSBram Moolenaar  com! -nargs=* VimFoldt <args> fold
124a0f849eeSBram Moolenaar else
125a0f849eeSBram Moolenaar  com! -nargs=* VimFoldt <args>
126a0f849eeSBram Moolenaar endif
127a0f849eeSBram Moolenaarelse
128a0f849eeSBram Moolenaar com! -nargs=*	VimFolda	<args>
129a0f849eeSBram Moolenaar com! -nargs=*	VimFoldf	<args>
130a0f849eeSBram Moolenaar com! -nargs=*	VimFoldl	<args>
131a0f849eeSBram Moolenaar com! -nargs=*	VimFoldm	<args>
132a0f849eeSBram Moolenaar com! -nargs=*	VimFoldp	<args>
133a0f849eeSBram Moolenaar com! -nargs=*	VimFoldP	<args>
134a0f849eeSBram Moolenaar com! -nargs=*	VimFoldr	<args>
135a0f849eeSBram Moolenaar com! -nargs=*	VimFoldt	<args>
136a0f849eeSBram Moolenaarendif
137a0f849eeSBram Moolenaar
138fa01c39dSBram Moolenaar" commands not picked up by the generator (due to non-standard format)
139fa01c39dSBram Moolenaarsyn keyword vimCommand contained	py3
140fa01c39dSBram Moolenaar
1413577c6faSBram Moolenaar" Deprecated variable options {{{2
1423577c6faSBram Moolenaarif exists("g:vim_minlines")
1433577c6faSBram Moolenaar let g:vimsyn_minlines= g:vim_minlines
1443577c6faSBram Moolenaarendif
1453577c6faSBram Moolenaarif exists("g:vim_maxlines")
1463577c6faSBram Moolenaar let g:vimsyn_maxlines= g:vim_maxlines
1473577c6faSBram Moolenaarendif
1483577c6faSBram Moolenaarif exists("g:vimsyntax_noerror")
1493577c6faSBram Moolenaar let g:vimsyn_noerror= g:vimsyntax_noerror
1503577c6faSBram Moolenaarendif
1513577c6faSBram Moolenaar
152cfbc5ee4SBram Moolenaar" Numbers {{{2
153071d4279SBram Moolenaar" =======
1549da7ff70SBram Moolenaarsyn match vimNumber	"\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
1559da7ff70SBram Moolenaarsyn match vimNumber	"-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\="  skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
156071d4279SBram Moolenaarsyn match vimNumber	"\<0[xX]\x\+"
157e2719096SBram Moolenaarsyn match vimNumber	"\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
158071d4279SBram Moolenaar
159cfbc5ee4SBram Moolenaar" All vimCommands are contained by vimIsCommands. {{{2
160b4ff518dSBram Moolenaarsyn match vimCmdSep	"[:|]\+"	skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
161293ee4d4SBram Moolenaarsyn match vimIsCommand	"\<\h\w*\>"	contains=vimCommand
16283d1b190SBram Moolenaarsyn match vimVar        contained	"\<\h[a-zA-Z0-9#_]*\>"
16383d1b190SBram Moolenaarsyn match vimVar		"\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
16483d1b190SBram Moolenaarsyn match vimFBVar      contained   "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
1653b1ddfedSBram Moolenaarsyn keyword vimCommand  contained	in
166071d4279SBram Moolenaar
167cfbc5ee4SBram Moolenaar" Insertions And Appends: insert append {{{2
168071d4279SBram Moolenaar" =======================
169071d4279SBram Moolenaarsyn region vimInsert	matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$"	matchgroup=vimCommand end="^\.$""
170071d4279SBram Moolenaarsyn region vimInsert	matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$"	matchgroup=vimCommand end="^\.$""
171071d4279SBram Moolenaarsyn region vimInsert	matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$"	matchgroup=vimCommand end="^\.$""
172071d4279SBram Moolenaar
173cfbc5ee4SBram Moolenaar" Behave! {{{2
174071d4279SBram Moolenaar" =======
175071d4279SBram Moolenaarsyn match   vimBehave	"\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError
176071d4279SBram Moolenaarsyn keyword vimBehaveModel contained	mswin	xterm
1776be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror")
178071d4279SBram Moolenaar syn match   vimBehaveError contained	"[^ ]\+"
179cfbc5ee4SBram Moolenaarendif
180071d4279SBram Moolenaar
181cfbc5ee4SBram Moolenaar" Filetypes {{{2
182071d4279SBram Moolenaar" =========
183293ee4d4SBram Moolenaarsyn match   vimFiletype	"\<filet\%[ype]\(\s\+\I\i*\)*"	skipwhite contains=vimFTCmd,vimFTOption,vimFTError
1846be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError")
185071d4279SBram Moolenaar syn match   vimFTError  contained	"\I\i*"
186cfbc5ee4SBram Moolenaarendif
187071d4279SBram Moolenaarsyn keyword vimFTCmd    contained	filet[ype]
188071d4279SBram Moolenaarsyn keyword vimFTOption contained	detect indent off on plugin
189071d4279SBram Moolenaar
190cfbc5ee4SBram Moolenaar" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
191071d4279SBram Moolenaar" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
192e2719096SBram 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
193b4ff518dSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a'
194b4ff518dSBram 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
195b4ff518dSBram Moolenaarelse
196b4ff518dSBram Moolenaar syn region  vimAugroup	matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"	contains=vimAutoCmd,@vimAugroupList
197b4ff518dSBram Moolenaarendif
1983b1ddfedSBram Moolenaarsyn match   vimAugroup	"aug\%[roup]!"	contains=vimAugroupKey
1996be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
200071d4279SBram Moolenaar syn match   vimAugroupError	"\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
201cfbc5ee4SBram Moolenaarendif
20283d1b190SBram Moolenaarsyn keyword vimAugroupKey contained	aug[roup]
203071d4279SBram Moolenaar
204cfbc5ee4SBram Moolenaar" Operators: {{{2
205071d4279SBram Moolenaar" =========
2069da7ff70SBram Moolenaarsyn cluster	vimOperGroup	contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
207071d4279SBram Moolenaarsyn match	vimOper	"\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}"	skipwhite nextgroup=vimString,vimSpecFile
208071d4279SBram Moolenaarsyn match	vimOper	"||\|&&\|[-+.]"	skipwhite nextgroup=vimString,vimSpecFile
20983d1b190SBram Moolenaarsyn region	vimOperParen 	matchgroup=vimParenSep	start="(" end=")" contains=@vimOperGroup
21083d1b190SBram Moolenaarsyn region	vimOperParen	matchgroup=vimSep		start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
2116be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
212071d4279SBram Moolenaar syn match	vimOperError	")"
213cfbc5ee4SBram Moolenaarendif
214071d4279SBram Moolenaar
2153577c6faSBram Moolenaar" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
2163577c6faSBram Moolenaar" =========
2175c73622aSBram Moolenaarsyn cluster	vimFuncList	contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
218b4ff518dSBram 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
2195c73622aSBram Moolenaarsyn match	vimFunction	"\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*("	contains=@vimFuncList nextgroup=vimFuncBody
2205c73622aSBram Moolenaar
221b4ff518dSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
222b4ff518dSBram Moolenaar syn region	vimFuncBody  contained	fold start="\ze\s*("	matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)"		contains=@vimFuncBodyList
223b4ff518dSBram Moolenaarelse
224b4ff518dSBram Moolenaar syn region	vimFuncBody  contained	start="\ze\s*("	matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)"		contains=@vimFuncBodyList
225b4ff518dSBram Moolenaarendif
226b4ff518dSBram Moolenaarsyn match	vimFuncVar   contained	"a:\(\K\k*\|\d\+\)"
2273577c6faSBram Moolenaarsyn match	vimFuncSID   contained	"\c<sid>\|\<s:"
2283577c6faSBram Moolenaarsyn keyword	vimFuncKey   contained	fu[nction]
2293577c6faSBram Moolenaarsyn match	vimFuncBlank contained	"\s\+"
2303577c6faSBram Moolenaar
2313577c6faSBram Moolenaarsyn keyword	vimPattern   contained	start	skip	end
2323577c6faSBram Moolenaar
233cfbc5ee4SBram Moolenaar" Special Filenames, Modifiers, Extension Removal: {{{2
234071d4279SBram Moolenaar" ===============================================
235071d4279SBram Moolenaarsyn match	vimSpecFile	"<c\(word\|WORD\)>"	nextgroup=vimSpecFileMod,vimSubst
236071d4279SBram Moolenaarsyn match	vimSpecFile	"<\([acs]file\|amatch\|abuf\)>"	nextgroup=vimSpecFileMod,vimSubst
237071d4279SBram Moolenaarsyn match	vimSpecFile	"\s%[ \t:]"ms=s+1,me=e-1	nextgroup=vimSpecFileMod,vimSubst
238071d4279SBram Moolenaarsyn match	vimSpecFile	"\s%$"ms=s+1	nextgroup=vimSpecFileMod,vimSubst
239071d4279SBram Moolenaarsyn match	vimSpecFile	"\s%<"ms=s+1,me=e-1	nextgroup=vimSpecFileMod,vimSubst
240071d4279SBram Moolenaarsyn match	vimSpecFile	"#\d\+\|[#%]<\>"	nextgroup=vimSpecFileMod,vimSubst
241071d4279SBram Moolenaarsyn match	vimSpecFileMod	"\(:[phtre]\)\+"	contained
242071d4279SBram Moolenaar
243cfbc5ee4SBram Moolenaar" User-Specified Commands: {{{2
244071d4279SBram Moolenaar" =======================
2455c73622aSBram 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
246071d4279SBram Moolenaarsyn keyword	vimUserCommand	contained	com[mand]
247b4ff518dSBram Moolenaarsyn match	vimUserCmd	"\<com\%[mand]!\=\>.*$"	contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
248b4ff518dSBram Moolenaarsyn match	vimUserAttrbError	contained	"-\a\+\ze\s"
249b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-nargs=[01*?+]"	contains=vimUserAttrbKey,vimOper
250b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-complete="		contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
251b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-range\(=%\|=\d\+\)\="	contains=vimNumber,vimOper,vimUserAttrbKey
252b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-count\(=\d\+\)\="	contains=vimNumber,vimOper,vimUserAttrbKey
253b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-bang\>"		contains=vimOper,vimUserAttrbKey
254071d4279SBram Moolenaarsyn match	vimUserAttrb	contained	"-bar\>"		contains=vimOper,vimUserAttrbKey
255b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-buffer\>"		contains=vimOper,vimUserAttrbKey
256b4ff518dSBram Moolenaarsyn match	vimUserAttrb	contained	"-register\>"		contains=vimOper,vimUserAttrbKey
2576be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
258071d4279SBram Moolenaar syn match	vimUserCmdError	contained	"\S\+\>"
259cfbc5ee4SBram Moolenaarendif
260071d4279SBram Moolenaarsyn case ignore
261071d4279SBram Moolenaarsyn keyword	vimUserAttrbKey   contained	bar	ban[g]	cou[nt]	ra[nge] com[plete]	n[args]	re[gister]
2629da7ff70SBram 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
263a93fa7eeSBram Moolenaarsyn keyword	vimUserAttrbCmplt contained	custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
2649da7ff70SBram Moolenaarsyn match	vimUserAttrbCmpltFunc contained	",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError
265a93fa7eeSBram Moolenaar
266071d4279SBram Moolenaarsyn case match
267071d4279SBram Moolenaarsyn match	vimUserAttrbCmplt contained	"custom,\u\w*"
268071d4279SBram Moolenaar
269cfbc5ee4SBram Moolenaar" Lower Priority Comments: after some vim commands... {{{2
270071d4279SBram Moolenaar" =======================
271071d4279SBram Moolenaarsyn match	vimComment	excludenl +\s"[^\-:.%#=*].*$+lc=1	contains=@vimCommentGroup,vimCommentString
272071d4279SBram Moolenaarsyn match	vimComment	+\<endif\s\+".*$+lc=5	contains=@vimCommentGroup,vimCommentString
273071d4279SBram Moolenaarsyn match	vimComment	+\<else\s\+".*$+lc=4	contains=@vimCommentGroup,vimCommentString
2744770d09aSBram Moolenaarsyn region	vimCommentString	contained oneline start='\S\s\+"'ms=e	end='"'
275071d4279SBram Moolenaar
276cfbc5ee4SBram Moolenaar" Environment Variables: {{{2
277071d4279SBram Moolenaar" =====================
278071d4279SBram Moolenaarsyn match	vimEnvvar	"\$\I\i*"
279071d4279SBram Moolenaarsyn match	vimEnvvar	"\${\I\i*}"
280071d4279SBram Moolenaar
281cfbc5ee4SBram Moolenaar" In-String Specials: {{{2
282071d4279SBram Moolenaar" Try to catch strings, if nothing else matches (therefore it must precede the others!)
283071d4279SBram Moolenaar"  vimEscapeBrace handles ["]  []"] (ie. "s don't terminate string inside [])
284d68071d8SBram Moolenaarsyn region	vimEscapeBrace	oneline   contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
285071d4279SBram Moolenaarsyn match	vimPatSepErr	contained	"\\)"
286071d4279SBram Moolenaarsyn match	vimPatSep	contained	"\\|"
287383f9bc3SBram Moolenaarsyn region	vimPatSepZone	oneline   contained   matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\]['"]"	contains=@vimStringGroup
288383f9bc3SBram Moolenaarsyn region	vimPatRegion	contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)"	contains=@vimSubstList oneline
289071d4279SBram Moolenaarsyn match	vimNotPatSep	contained	"\\\\"
2909964e468SBram Moolenaarsyn cluster	vimStringGroup	contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
2919da7ff70SBram Moolenaarsyn region	vimString	oneline keepend	start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+	contains=@vimStringGroup
2929da7ff70SBram Moolenaarsyn region	vimString	oneline keepend	start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+
293071d4279SBram Moolenaarsyn region	vimString	oneline	start=+=!+lc=1	skip=+\\\\\|\\!+ end=+!+	contains=@vimStringGroup
294071d4279SBram Moolenaarsyn region	vimString	oneline	start="=+"lc=1	skip="\\\\\|\\+" end="+"	contains=@vimStringGroup
295071d4279SBram Moolenaarsyn region	vimString	oneline	start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/"	contains=@vimStringGroup
296071d4279SBram Moolenaarsyn match	vimString	contained	+"[^"]*\\$+	skipnl nextgroup=vimStringCont
297071d4279SBram Moolenaarsyn match	vimStringCont	contained	+\(\\\\\|.\)\{-}[^\\]"+
298071d4279SBram Moolenaar
299cfbc5ee4SBram Moolenaar" Substitutions: {{{2
300071d4279SBram Moolenaar" =============
301071d4279SBram Moolenaarsyn cluster	vimSubstList	contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
302071d4279SBram Moolenaarsyn cluster	vimSubstRepList	contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
303071d4279SBram Moolenaarsyn cluster	vimSubstList	add=vimCollection
3049da7ff70SBram Moolenaarsyn match	vimSubst	"\(:\+\s*\|^\s*\||\s*\)\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[:[:alpha:]]\@!" nextgroup=vimSubstPat
305*e0fa3742SBram Moolenaarsyn match	vimSubst	"\%(^\|[^\\]\)s\%[ubstitute][:#[:alpha:]]\@!"	nextgroup=vimSubstPat contained
306071d4279SBram Moolenaarsyn match	vimSubst	"/\zss\%[ubstitute]\ze/"	nextgroup=vimSubstPat
307071d4279SBram Moolenaarsyn match	vimSubst1       contained	"s\%[ubstitute]\>"	nextgroup=vimSubstPat
308071d4279SBram 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
309071d4279SBram Moolenaarsyn region	vimSubstRep4    contained	matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList	nextgroup=vimSubstFlagErr	oneline
310071d4279SBram Moolenaarsyn region	vimCollection   contained transparent	start="\\\@<!\[" skip="\\\[" end="\]"	contains=vimCollClass
311071d4279SBram Moolenaarsyn match	vimCollClassErr contained	"\[:.\{-\}:\]"
312071d4279SBram Moolenaarsyn match	vimCollClass    contained transparent	"\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]"
313071d4279SBram Moolenaarsyn match	vimSubstSubstr  contained	"\\z\=\d"
314071d4279SBram Moolenaarsyn match	vimSubstTwoBS   contained	"\\\\"
315a5792f58SBram Moolenaarsyn match	vimSubstFlagErr contained	"[^< \t\r|]\+" contains=vimSubstFlags
316071d4279SBram Moolenaarsyn match	vimSubstFlags   contained	"[&cegiIpr]\+"
317071d4279SBram Moolenaar
318cfbc5ee4SBram Moolenaar" 'String': {{{2
3198b6144bdSBram Moolenaarsyn match	vimString	"[^(,]'[^']\{-}\zs'"
320071d4279SBram Moolenaar
321cfbc5ee4SBram Moolenaar" Marks, Registers, Addresses, Filters: {{{2
322071d4279SBram Moolenaarsyn match	vimMark	"'[a-zA-Z0-9]\ze[-+,!]"	nextgroup=vimOper,vimMarkNumber,vimSubst
323071d4279SBram Moolenaarsyn match	vimMark	"'[<>]\ze[-+,!]"		nextgroup=vimOper,vimMarkNumber,vimSubst
324071d4279SBram Moolenaarsyn match	vimMark	",\zs'[<>]\ze"		nextgroup=vimOper,vimMarkNumber,vimSubst
325071d4279SBram Moolenaarsyn match	vimMark	"[!,:]\zs'[a-zA-Z0-9]"	nextgroup=vimOper,vimMarkNumber,vimSubst
326071d4279SBram Moolenaarsyn match	vimMark	"\<norm\%[al]\s\zs'[a-zA-Z0-9]"	nextgroup=vimOper,vimMarkNumber,vimSubst
327071d4279SBram Moolenaarsyn match	vimMarkNumber	"[-+]\d\+"		nextgroup=vimSubst contained contains=vimOper
328071d4279SBram Moolenaarsyn match	vimPlainMark contained	"'[a-zA-Z0-9]"
329071d4279SBram Moolenaar
330b4ff518dSBram Moolenaarsyn match	vimRegister	'[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
3315b8d8fdbSBram Moolenaarsyn match	vimRegister	'\<norm\s\+\zs"[a-zA-Z0-9]'
3325b8d8fdbSBram Moolenaarsyn match	vimRegister	'\<normal\s\+\zs"[a-zA-Z0-9]'
333cfbc5ee4SBram Moolenaarsyn match	vimRegister	'@"'
334071d4279SBram Moolenaarsyn match	vimPlainRegister contained	'"[a-zA-Z0-9\-:.%#*+=]'
335071d4279SBram Moolenaar
3365b8d8fdbSBram Moolenaarsyn match	vimAddress	",\zs[.$]"	skipwhite nextgroup=vimSubst1
3375b8d8fdbSBram Moolenaarsyn match	vimAddress	"%\ze\a"	skipwhite nextgroup=vimString,vimSubst1
338071d4279SBram Moolenaar
339071d4279SBram Moolenaarsyn match	vimFilter contained	"^!.\{-}\(|\|$\)"		contains=vimSpecFile
340d960d76dSBram Moolenaarsyn match	vimFilter contained	"\A!.\{-}\(|\|$\)"ms=s+1	contains=vimSpecFile,vimFunction,vimFuncName,vimOperParen
341071d4279SBram Moolenaar
342cfbc5ee4SBram Moolenaar" Complex repeats (:h complex-repeat) {{{2
3436be7f873SBram Moolenaarsyn match	vimCmplxRepeat	'[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
3446be7f873SBram Moolenaarsyn match	vimCmplxRepeat	'@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
345071d4279SBram Moolenaar
346cfbc5ee4SBram Moolenaar" Set command and associated set-options (vimOptions) with comment {{{2
34774cbdf03SBram 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
3489da7ff70SBram Moolenaarsyn region	vimSetEqual	contained	start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
349071d4279SBram Moolenaarsyn region	vimSetString	contained	start=+="+hs=s+1	skip=+\\\\\|\\"+  end=+"+	contains=vimCtrlChar
350b4ff518dSBram Moolenaarsyn match	vimSetSep	contained	"[,:]" skipwhite nextgroup=vimCommand
3515c73622aSBram Moolenaarsyn match	vimSetMod	contained	"&vim\=\|[!&?<]\|all&"
352071d4279SBram Moolenaar
353cfbc5ee4SBram Moolenaar" Let {{{2
354071d4279SBram Moolenaar" ===
3555c73622aSBram Moolenaarsyn keyword	vimLet	let	unl[et]	skipwhite nextgroup=vimVar,vimFuncVar
356071d4279SBram Moolenaar
357e37d50a5SBram Moolenaar" Abbreviations {{{2
358e37d50a5SBram Moolenaar" =============
359e37d50a5SBram Moolenaarsyn keyword vimAbb	ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs
360e37d50a5SBram Moolenaar
361cfbc5ee4SBram Moolenaar" Autocmd {{{2
362071d4279SBram Moolenaar" =======
363071d4279SBram Moolenaarsyn match	vimAutoEventList	contained	"\(!\s\+\)\=\(\a\+,\)*\a\+"	contains=vimAutoEvent nextgroup=vimAutoCmdSpace
364071d4279SBram Moolenaarsyn match	vimAutoCmdSpace	contained	"\s\+"	nextgroup=vimAutoCmdSfxList
365071d4279SBram Moolenaarsyn match	vimAutoCmdSfxList	contained	"\S*"
366071d4279SBram Moolenaarsyn keyword	vimAutoCmd	au[tocmd] do[autocmd] doautoa[ll]	skipwhite nextgroup=vimAutoEventList
367071d4279SBram Moolenaar
368cfbc5ee4SBram Moolenaar" Echo and Execute -- prefer strings! {{{2
369071d4279SBram Moolenaar" ================
3705c73622aSBram Moolenaarsyn region	vimEcho	oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar
3715c73622aSBram Moolenaarsyn region	vimExecute	oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar
372071d4279SBram Moolenaarsyn match	vimEchoHL	"echohl\="	skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone
373071d4279SBram Moolenaarsyn case ignore
374071d4279SBram Moolenaarsyn keyword	vimEchoHLNone	none
375071d4279SBram Moolenaarsyn case match
376071d4279SBram Moolenaar
377cfbc5ee4SBram Moolenaar" Maps {{{2
378071d4279SBram Moolenaar" ====
3793577c6faSBram Moolenaarsyn match	vimMap		"\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
3805c73622aSBram 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
38181af9250SBram Moolenaarsyn keyword	vimMap		mapc[lear] smapc[lear]
3825c73622aSBram 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
383b8a7b560SBram Moolenaarsyn match	vimMapLhs	contained	"\S\+"			contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
384b8a7b560SBram Moolenaarsyn match	vimMapBang	contained	"!"			skipwhite nextgroup=vimMapMod,vimMapLhs
385b4ff518dSBram Moolenaarsyn match	vimMapMod	contained	"\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
386b8a7b560SBram Moolenaarsyn match	vimMapRhs	contained	".*" contains=vimNotation,vimCtrlChar	skipnl nextgroup=vimMapRhsExtend
387b4ff518dSBram Moolenaarsyn match	vimMapRhsExtend	contained	"^\s*\\.*$"			contains=vimContinue
388071d4279SBram Moolenaarsyn case ignore
389b4ff518dSBram Moolenaarsyn keyword	vimMapModKey	contained	buffer	expr	leader	localleader	nowait	plug	script	sid	silent	unique
390071d4279SBram Moolenaarsyn case match
391071d4279SBram Moolenaar
392cfbc5ee4SBram Moolenaar" Menus {{{2
393071d4279SBram Moolenaar" =====
394071d4279SBram Moolenaarsyn cluster	vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod
395071d4279SBram 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
396071d4279SBram Moolenaarsyn match	vimMenuName	"[^ \t\\<]\+"	contained nextgroup=vimMenuNameMore,vimMenuMap
397071d4279SBram Moolenaarsyn match	vimMenuPriority	"\d\+\(\.\d\+\)*"	contained skipwhite nextgroup=vimMenuName
398071d4279SBram Moolenaarsyn match	vimMenuNameMore	"\c\\\s\|<tab>\|\\\."	contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation
399071d4279SBram Moolenaarsyn match	vimMenuMod    contained	"\c<\(script\|silent\)\+>"  skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList
400071d4279SBram Moolenaarsyn match	vimMenuMap	"\s"	contained skipwhite nextgroup=vimMenuRhs
401071d4279SBram Moolenaarsyn match	vimMenuRhs	".*$"	contained contains=vimString,vimComment,vimIsCommand
402071d4279SBram Moolenaarsyn match	vimMenuBang	"!"	contained skipwhite nextgroup=@vimMenuList
403071d4279SBram Moolenaar
404cfbc5ee4SBram Moolenaar" Angle-Bracket Notation (tnx to Michael Geddes) {{{2
405071d4279SBram Moolenaar" ======================
406071d4279SBram Moolenaarsyn case ignore
40783d1b190SBram 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
408071d4279SBram Moolenaarsyn match	vimNotation	"\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>"	contains=vimBracket
409071d4279SBram Moolenaarsyn match	vimNotation	"\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>"		contains=vimBracket
410071d4279SBram Moolenaarsyn match	vimNotation	'\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1			contains=vimBracket
411d68071d8SBram Moolenaarsyn match	vimNotation	'\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|f-args\|lt\)>'	contains=vimBracket
412071d4279SBram Moolenaarsyn match	vimNotation	"\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>"		contains=vimBracket
413071d4279SBram Moolenaarsyn match	vimBracket contained	"[\\<>]"
414071d4279SBram Moolenaarsyn case match
415071d4279SBram Moolenaar
4163577c6faSBram Moolenaar" User Function Highlighting {{{2
4173577c6faSBram Moolenaar" (following Gautam Iyer's suggestion)
418071d4279SBram Moolenaar" ==========================
419a0f849eeSBram Moolenaarsyn match vimFunc		"\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*("		contains=vimFuncName,vimUserFunc,vimExecute
420a0f849eeSBram 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
4215c73622aSBram Moolenaarsyn match vimNotFunc	"\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>"
422071d4279SBram Moolenaar
4233577c6faSBram Moolenaar" Errors And Warnings: {{{2
4243577c6faSBram Moolenaar" ====================
4256be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
4265c73622aSBram Moolenaar syn match	vimFunctionError	"\s\zs[a-z0-9]\i\{-}\ze\s*("			contained contains=vimFuncKey,vimFuncBlank
4275c73622aSBram Moolenaar" syn match	vimFunctionError	"\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*("	contained contains=vimFuncKey,vimFuncBlank
4283577c6faSBram Moolenaar syn match	vimElseIfErr	"\<else\s\+if\>"
4293577c6faSBram Moolenaar syn match	vimBufnrWarn	/\<bufnr\s*(\s*["']\.['"]\s*)/
4303577c6faSBram Moolenaarendif
4313577c6faSBram Moolenaar
4323577c6faSBram Moolenaar" Norm {{{2
43305159a0cSBram Moolenaar" ====
43405159a0cSBram Moolenaarsyn match	vimNorm		"\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds
43505159a0cSBram Moolenaarsyn match	vimNormCmds contained	".*$"
43605159a0cSBram Moolenaar
437cfbc5ee4SBram Moolenaar" Syntax {{{2
438071d4279SBram Moolenaar"=======
439071d4279SBram Moolenaarsyn match	vimGroupList	contained	"@\=[^ \t,]*"	contains=vimGroupSpecial,vimPatSep
440071d4279SBram Moolenaarsyn match	vimGroupList	contained	"@\=[^ \t,]*,"	nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep
4415c73622aSBram Moolenaarsyn keyword	vimGroupSpecial	contained	ALL	ALLBUT	CONTAINED	TOP
4426be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror")
443071d4279SBram Moolenaar syn match	vimSynError	contained	"\i\+"
444071d4279SBram Moolenaar syn match	vimSynError	contained	"\i\+="	nextgroup=vimGroupList
445cfbc5ee4SBram Moolenaarendif
446071d4279SBram Moolenaarsyn match	vimSynContains	contained	"\<contain\(s\|edin\)="	nextgroup=vimGroupList
447071d4279SBram Moolenaarsyn match	vimSynKeyContainedin	contained	"\<containedin="	nextgroup=vimGroupList
448071d4279SBram Moolenaarsyn match	vimSynNextgroup	contained	"nextgroup="	nextgroup=vimGroupList
449071d4279SBram Moolenaar
450071d4279SBram Moolenaarsyn match	vimSyntax	"\<sy\%[ntax]\>"	contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
451071d4279SBram Moolenaarsyn match	vimAuSyntax	contained	"\s+sy\%[ntax]"	contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
452d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSyntax
453071d4279SBram Moolenaar
454cfbc5ee4SBram Moolenaar" Syntax: case {{{2
455071d4279SBram Moolenaarsyn keyword	vimSynType	contained	case	skipwhite nextgroup=vimSynCase,vimSynCaseError
4566be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror")
457071d4279SBram Moolenaar syn match	vimSynCaseError	contained	"\i\+"
458cfbc5ee4SBram Moolenaarendif
459071d4279SBram Moolenaarsyn keyword	vimSynCase	contained	ignore	match
460071d4279SBram Moolenaar
461cfbc5ee4SBram Moolenaar" Syntax: clear {{{2
462071d4279SBram Moolenaarsyn keyword	vimSynType	contained	clear	skipwhite nextgroup=vimGroupList
463071d4279SBram Moolenaar
464cfbc5ee4SBram Moolenaar" Syntax: cluster {{{2
465071d4279SBram Moolenaarsyn keyword	vimSynType	contained	cluster	skipwhite nextgroup=vimClusterName
466a0f849eeSBram Moolenaarsyn region	vimClusterName	contained	matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
467071d4279SBram Moolenaarsyn match	vimGroupAdd	contained	"add="	nextgroup=vimGroupList
468071d4279SBram Moolenaarsyn match	vimGroupRem	contained	"remove="	nextgroup=vimGroupList
469d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
470071d4279SBram Moolenaar
47113d5aeefSBram Moolenaar" Syntax: iskeyword {{{2
47213d5aeefSBram Moolenaarsyn keyword	vimSynType	contained	iskeyword	skipwhite nextgroup=vimIskList
47313d5aeefSBram Moolenaarsyn match	vimIskList	contained	'\S\+'	contains=vimIskSep
47413d5aeefSBram Moolenaarsyn match	vimIskSep	contained	','
47513d5aeefSBram Moolenaar
476cfbc5ee4SBram Moolenaar" Syntax: include {{{2
477071d4279SBram Moolenaarsyn keyword	vimSynType	contained	include	skipwhite nextgroup=vimGroupList
478d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType
479071d4279SBram Moolenaar
480cfbc5ee4SBram Moolenaar" Syntax: keyword {{{2
481071d4279SBram Moolenaarsyn cluster	vimSynKeyGroup	contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
482071d4279SBram Moolenaarsyn keyword	vimSynType	contained	keyword	skipwhite nextgroup=vimSynKeyRegion
483a0f849eeSBram Moolenaarsyn region	vimSynKeyRegion	contained oneline keepend	matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
484071d4279SBram Moolenaarsyn match	vimSynKeyOpt	contained	"\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
485d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType
486071d4279SBram Moolenaar
487cfbc5ee4SBram Moolenaar" Syntax: match {{{2
488071d4279SBram Moolenaarsyn cluster	vimSynMtchGroup	contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
489071d4279SBram Moolenaarsyn keyword	vimSynType	contained	match	skipwhite nextgroup=vimSynMatchRegion
490a0f849eeSBram Moolenaarsyn region	vimSynMatchRegion	contained keepend	matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
491071d4279SBram Moolenaarsyn match	vimSynMtchOpt	contained	"\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
492071d4279SBram Moolenaarif has("conceal")
49383d1b190SBram Moolenaar syn match	vimSynMtchOpt	contained	"\<cchar="	nextgroup=vimSynMtchCchar
4945c73622aSBram Moolenaar syn match	vimSynMtchCchar	contained	"\S"
495071d4279SBram Moolenaarendif
496d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynMtchGroup
497071d4279SBram Moolenaar
498cfbc5ee4SBram Moolenaar" Syntax: off and on {{{2
499071d4279SBram Moolenaarsyn keyword	vimSynType	contained	enable	list	manual	off	on	reset
500071d4279SBram Moolenaar
501cfbc5ee4SBram Moolenaar" Syntax: region {{{2
502071d4279SBram Moolenaarsyn cluster	vimSynRegPatGroup	contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
503071d4279SBram Moolenaarsyn cluster	vimSynRegGroup	contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
504071d4279SBram Moolenaarsyn keyword	vimSynType	contained	region	skipwhite nextgroup=vimSynRegion
505a0f849eeSBram Moolenaarsyn region	vimSynRegion	contained keepend	matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
506071d4279SBram Moolenaarsyn match	vimSynRegOpt	contained	"\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
507071d4279SBram Moolenaarsyn match	vimSynReg	contained	"\(start\|skip\|end\)="he=e-1	nextgroup=vimSynRegPat
508071d4279SBram Moolenaarsyn match	vimSynMtchGrp	contained	"matchgroup="	nextgroup=vimGroup,vimHLGroup
509071d4279SBram Moolenaarsyn region	vimSynRegPat	contained extend	start="\z([-`~!@#$%^&*_=+;:'",./?]\)"  skip="\\\\\|\\\z1"  end="\z1"  contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
510071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
511071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
512071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"lc=\d\+"
513071d4279SBram Moolenaarsyn match	vimSynPatMod	contained	"lc=\d\+," nextgroup=vimSynPatMod
514071d4279SBram Moolenaarsyn region	vimSynPatRange	contained	start="\["	skip="\\\\\|\\]"   end="]"
515071d4279SBram Moolenaarsyn match	vimSynNotPatRange	contained	"\\\\\|\\\["
516071d4279SBram Moolenaarsyn match	vimMtchComment	contained	'"[^"]\+$'
517d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType
518071d4279SBram Moolenaar
519cfbc5ee4SBram Moolenaar" Syntax: sync {{{2
520071d4279SBram Moolenaar" ============
521df177f67SBram Moolenaarsyn keyword vimSynType	contained	sync	skipwhite	nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion
5226be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror")
523071d4279SBram Moolenaar syn match	vimSyncError	contained	"\i\+"
524cfbc5ee4SBram Moolenaarendif
525071d4279SBram Moolenaarsyn keyword	vimSyncC	contained	ccomment	clear	fromstart
526071d4279SBram Moolenaarsyn keyword	vimSyncMatch	contained	match	skipwhite	nextgroup=vimSyncGroupName
527071d4279SBram Moolenaarsyn keyword	vimSyncRegion	contained	region	skipwhite	nextgroup=vimSynReg
528df177f67SBram Moolenaarsyn match	vimSyncLinebreak	contained	"\<linebreaks="	skipwhite	nextgroup=vimNumber
529071d4279SBram Moolenaarsyn keyword	vimSyncLinecont	contained	linecont	skipwhite	nextgroup=vimSynRegPat
530071d4279SBram Moolenaarsyn match	vimSyncLines	contained	"\(min\|max\)\=lines="	nextgroup=vimNumber
531a0f849eeSBram Moolenaarsyn match	vimSyncGroupName	contained	"\h\w*"	skipwhite	nextgroup=vimSyncKey
532071d4279SBram Moolenaarsyn match	vimSyncKey	contained	"\<groupthere\|grouphere\>"	skipwhite nextgroup=vimSyncGroup
533a0f849eeSBram Moolenaarsyn match	vimSyncGroup	contained	"\h\w*"	skipwhite	nextgroup=vimSynRegPat,vimSyncNone
534071d4279SBram Moolenaarsyn keyword	vimSyncNone	contained	NONE
535071d4279SBram Moolenaar
536cfbc5ee4SBram Moolenaar" Additional IsCommand, here by reasons of precedence {{{2
537071d4279SBram Moolenaar" ====================
538071d4279SBram Moolenaarsyn match	vimIsCommand	"<Bar>\s*\a\+"	transparent contains=vimCommand,vimNotation
539071d4279SBram Moolenaar
540cfbc5ee4SBram Moolenaar" Highlighting {{{2
541071d4279SBram Moolenaar" ============
542071d4279SBram Moolenaarsyn cluster	vimHighlightCluster		contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment
5436be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
5446be7f873SBram Moolenaar syn match	vimHiCtermError	contained	"[^0-9]\i*"
5456be7f873SBram Moolenaarendif
546071d4279SBram Moolenaarsyn match	vimHighlight	"\<hi\%[ghlight]\>"	skipwhite nextgroup=vimHiBang,@vimHighlightCluster
547071d4279SBram Moolenaarsyn match	vimHiBang	contained	"!"	skipwhite nextgroup=@vimHighlightCluster
548071d4279SBram Moolenaar
549071d4279SBram Moolenaarsyn match	vimHiGroup	contained	"\i\+"
550071d4279SBram Moolenaarsyn case ignore
5514770d09aSBram Moolenaarsyn keyword	vimHiAttrib	contained	none bold inverse italic reverse standout underline undercurl
552071d4279SBram Moolenaarsyn keyword	vimFgBgAttrib	contained	none bg background fg foreground
553071d4279SBram Moolenaarsyn case match
554071d4279SBram Moolenaarsyn match	vimHiAttribList	contained	"\i\+"	contains=vimHiAttrib
555071d4279SBram Moolenaarsyn match	vimHiAttribList	contained	"\i\+,"he=e-1	contains=vimHiAttrib nextgroup=vimHiAttribList
556071d4279SBram Moolenaarsyn case ignore
5576be7f873SBram 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
5586be7f873SBram Moolenaarsyn match	vimHiCtermColor	contained	"\<color\d\{1,3}\>"
559071d4279SBram Moolenaar
560071d4279SBram Moolenaarsyn case match
561071d4279SBram Moolenaarsyn match	vimHiFontname	contained	"[a-zA-Z\-*]\+"
562071d4279SBram Moolenaarsyn match	vimHiGuiFontname	contained	"'[a-zA-Z\-* ]\+'"
563071d4279SBram Moolenaarsyn match	vimHiGuiRgb	contained	"#\x\{6}"
564071d4279SBram Moolenaar
565cfbc5ee4SBram Moolenaar" Highlighting: hi group key=arg ... {{{2
5665c73622aSBram Moolenaarsyn cluster	vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation
567071d4279SBram Moolenaarsyn region	vimHiKeyList	contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||"	contains=@vimHiCluster
5686be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror")
569071d4279SBram Moolenaar syn match	vimHiKeyError	contained	"\i\+="he=e-1
570cfbc5ee4SBram Moolenaarendif
571071d4279SBram Moolenaarsyn match	vimHiTerm	contained	"\cterm="he=e-1		nextgroup=vimHiAttribList
572071d4279SBram Moolenaarsyn match	vimHiStartStop	contained	"\c\(start\|stop\)="he=e-1	nextgroup=vimHiTermcap,vimOption
573071d4279SBram Moolenaarsyn match	vimHiCTerm	contained	"\ccterm="he=e-1		nextgroup=vimHiAttribList
57483d1b190SBram Moolenaarsyn match	vimHiCtermFgBg	contained	"\ccterm[fb]g="he=e-1	nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
575071d4279SBram Moolenaarsyn match	vimHiGui	contained	"\cgui="he=e-1		nextgroup=vimHiAttribList
576071d4279SBram Moolenaarsyn match	vimHiGuiFont	contained	"\cfont="he=e-1		nextgroup=vimHiFontname
5774770d09aSBram Moolenaarsyn match	vimHiGuiFgBg	contained	"\cgui\%([fb]g\|sp\)="he=e-1	nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
578071d4279SBram Moolenaarsyn match	vimHiTermcap	contained	"\S\+"		contains=vimNotation
57983d1b190SBram Moolenaarsyn match	vimHiNmbr	contained	'\d\+'
580071d4279SBram Moolenaar
581cfbc5ee4SBram Moolenaar" Highlight: clear {{{2
582071d4279SBram Moolenaarsyn keyword	vimHiClear	contained	clear	nextgroup=vimHiGroup
583071d4279SBram Moolenaar
584cfbc5ee4SBram Moolenaar" Highlight: link {{{2
58583d1b190SBram Moolenaarsyn region	vimHiLink	contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$"	contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
586d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimHiLink
587071d4279SBram Moolenaar
588cfbc5ee4SBram Moolenaar" Control Characters {{{2
589071d4279SBram Moolenaar" ==================
590071d4279SBram Moolenaarsyn match	vimCtrlChar	"[--]"
591071d4279SBram Moolenaar
592cfbc5ee4SBram Moolenaar" Beginners - Patterns that involve ^ {{{2
593071d4279SBram Moolenaar" =========
594071d4279SBram Moolenaarsyn match	vimLineComment	+^[ \t:]*".*$+	contains=@vimCommentGroup,vimCommentString,vimCommentTitle
595ff1d0d4cSBram Moolenaarsyn match	vimCommentTitle	'"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1	contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
596071d4279SBram Moolenaarsyn match	vimContinue	"^\s*\\"
597071d4279SBram Moolenaarsyn region	vimString	start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
598071d4279SBram Moolenaarsyn match	vimCommentTitleLeader	'"\s\+'ms=s+1	contained
599071d4279SBram Moolenaar
60018144c84SBram Moolenaar" Searches And Globals: {{{2
60118144c84SBram Moolenaar" ====================
602e2f98b95SBram Moolenaarsyn match	vimSearch	'^\s*[/?].*'		contains=vimSearchDelim
603e2f98b95SBram Moolenaarsyn match	vimSearchDelim	'^\s*\zs[/?]\|[/?]$'	contained
6049da7ff70SBram Moolenaarsyn region	vimGlobal	matchgroup=Statement start='\<g\%[lobal]!\=/'  skip='\\.' end='/'	skipwhite nextgroup=vimSubst
6059da7ff70SBram Moolenaarsyn region	vimGlobal	matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/'	skipwhite nextgroup=vimSubst
606e2f98b95SBram Moolenaar
607cfbc5ee4SBram Moolenaar" Scripts  : perl,ruby : Benoit Cerrina {{{2
608071d4279SBram Moolenaar" =======    python,tcl: Johannes Zellner
6094b22cdb0SBram Moolenaar"            lua
610071d4279SBram Moolenaar
6113577c6faSBram Moolenaar" Allows users to specify the type of embedded script highlighting
6123577c6faSBram Moolenaar" they want:  (perl/python/ruby/tcl support)
6133577c6faSBram Moolenaar"   g:vimsyn_embed == 0   : don't embed any scripts
614b4ff518dSBram Moolenaar"   g:vimsyn_embed =~ 'l' : embed lua      (but only if vim supports it)
615b4ff518dSBram Moolenaar"   g:vimsyn_embed =~ 'm' : embed mzscheme (but only if vim supports it)
616b4ff518dSBram Moolenaar"   g:vimsyn_embed =~ 'p' : embed perl     (but only if vim supports it)
617b4ff518dSBram Moolenaar"   g:vimsyn_embed =~ 'P' : embed python   (but only if vim supports it)
618b4ff518dSBram Moolenaar"   g:vimsyn_embed =~ 'r' : embed ruby     (but only if vim supports it)
619b4ff518dSBram Moolenaar"   g:vimsyn_embed =~ 't' : embed tcl      (but only if vim supports it)
6207cba6c06SBram Moolenaarif !exists("g:vimsyn_embed")
621a0f849eeSBram Moolenaar let g:vimsyn_embed= "lmpPr"
6227cba6c06SBram Moolenaarendif
623071d4279SBram Moolenaar
6244b22cdb0SBram Moolenaar" [-- lua --] {{{3
625adc2182cSBram Moolenaarlet s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim")
6264b22cdb0SBram Moolenaarif !filereadable(s:luapath)
627a0f849eeSBram Moolenaar for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n")
628a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:luapath))
629a0f849eeSBram Moolenaar   let s:luapath= fnameescape(s:luapath)
6309da7ff70SBram Moolenaar   break
6319da7ff70SBram Moolenaar  endif
6329da7ff70SBram Moolenaar endfor
6334b22cdb0SBram Moolenaarendif
634a0f849eeSBram Moolenaarif (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath)
6354b22cdb0SBram Moolenaar unlet! b:current_syntax
6364b22cdb0SBram Moolenaar exe "syn include @vimLuaScript ".s:luapath
637a0f849eeSBram Moolenaar VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimLuaScript
638a0f849eeSBram Moolenaar VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+		contains=@vimLuaScript
6394b22cdb0SBram Moolenaar syn cluster vimFuncBodyList	add=vimLuaRegion
6404b22cdb0SBram Moolenaarelse
6414b22cdb0SBram Moolenaar syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+
6424b22cdb0SBram Moolenaar syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+
6434b22cdb0SBram Moolenaarendif
6444b22cdb0SBram Moolenaarunlet s:luapath
6454b22cdb0SBram Moolenaar
646cfbc5ee4SBram Moolenaar" [-- perl --] {{{3
647adc2182cSBram Moolenaarlet s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim")
6485c73622aSBram Moolenaarif !filereadable(s:perlpath)
649a0f849eeSBram Moolenaar for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n")
650a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:perlpath))
651a0f849eeSBram Moolenaar   let s:perlpath= fnameescape(s:perlpath)
6529da7ff70SBram Moolenaar   break
6539da7ff70SBram Moolenaar  endif
6549da7ff70SBram Moolenaar endfor
6555c73622aSBram Moolenaarendif
656a0f849eeSBram Moolenaarif (g:vimsyn_embed =~ 'p' && has("perl")) && filereadable(s:perlpath)
657071d4279SBram Moolenaar unlet! b:current_syntax
6585c73622aSBram Moolenaar exe "syn include @vimPerlScript ".s:perlpath
659a0f849eeSBram Moolenaar VimFoldp syn region vimPerlRegion  matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimPerlScript
660a0f849eeSBram Moolenaar VimFoldp syn region vimPerlRegion	matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+	contains=@vimPerlScript
6615c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimPerlRegion
662c236c16dSBram Moolenaarelse
663c236c16dSBram Moolenaar syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+
664c236c16dSBram Moolenaar syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+
6653577c6faSBram Moolenaarendif
6665c73622aSBram Moolenaarunlet s:perlpath
667071d4279SBram Moolenaar
668cfbc5ee4SBram Moolenaar" [-- ruby --] {{{3
669adc2182cSBram Moolenaarlet s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim")
6705c73622aSBram Moolenaarif !filereadable(s:rubypath)
671a0f849eeSBram Moolenaar for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n")
672a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:rubypath))
673a0f849eeSBram Moolenaar   let s:rubypath= fnameescape(s:rubypath)
6749da7ff70SBram Moolenaar   break
6759da7ff70SBram Moolenaar  endif
6769da7ff70SBram Moolenaar endfor
6775c73622aSBram Moolenaarendif
678a0f849eeSBram Moolenaarif (g:vimsyn_embed =~ 'r' && has("ruby")) && filereadable(s:rubypath)
679071d4279SBram Moolenaar unlet! b:current_syntax
6805c73622aSBram Moolenaar exe "syn include @vimRubyScript ".s:rubypath
681a0f849eeSBram Moolenaar VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimRubyScript
682071d4279SBram Moolenaar syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+		contains=@vimRubyScript
6835c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimRubyRegion
684c236c16dSBram Moolenaarelse
685c236c16dSBram Moolenaar syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+
686c236c16dSBram Moolenaar syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+
687071d4279SBram Moolenaarendif
6885c73622aSBram Moolenaarunlet s:rubypath
689071d4279SBram Moolenaar
690cfbc5ee4SBram Moolenaar" [-- python --] {{{3
691adc2182cSBram Moolenaarlet s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim")
6925c73622aSBram Moolenaarif !filereadable(s:pythonpath)
693a0f849eeSBram Moolenaar for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n")
694a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:pythonpath))
695a0f849eeSBram Moolenaar   let s:pythonpath= fnameescape(s:pythonpath)
6969da7ff70SBram Moolenaar   break
6975c73622aSBram Moolenaar  endif
6989da7ff70SBram Moolenaar endfor
6999da7ff70SBram Moolenaarendif
7009da7ff70SBram Moolenaarif g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath)
701071d4279SBram Moolenaar unlet! b:current_syntax
7025c73622aSBram Moolenaar exe "syn include @vimPythonScript ".s:pythonpath
703a0f849eeSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimPythonScript
704a0f849eeSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+		contains=@vimPythonScript
705b4ff518dSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+		contains=@vimPythonScript
706b4ff518dSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+		contains=@vimPythonScript
7075c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimPythonRegion
708c236c16dSBram Moolenaarelse
709fa01c39dSBram Moolenaar syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
710fa01c39dSBram Moolenaar syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+
7113577c6faSBram Moolenaarendif
7125c73622aSBram Moolenaarunlet s:pythonpath
713071d4279SBram Moolenaar
714cfbc5ee4SBram Moolenaar" [-- tcl --] {{{3
715a0f849eeSBram Moolenaarif has("win32") || has("win95") || has("win64") || has("win16")
716a0f849eeSBram Moolenaar " apparently has("tcl") has been hanging vim on some windows systems with cygwin
717a0f849eeSBram Moolenaar let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$')
718a0f849eeSBram Moolenaarelse
719a0f849eeSBram Moolenaar let s:trytcl= 1
720a0f849eeSBram Moolenaarendif
721a6878375SBram Moolenaarif s:trytcl
722adc2182cSBram Moolenaar let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim")
7235c73622aSBram Moolenaar if !filereadable(s:tclpath)
724a0f849eeSBram Moolenaar  for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n")
725a0f849eeSBram Moolenaar   if filereadable(fnameescape(s:tclpath))
726a0f849eeSBram Moolenaar    let s:tclpath= fnameescape(s:tclpath)
7279da7ff70SBram Moolenaar    break
7289da7ff70SBram Moolenaar   endif
7299da7ff70SBram Moolenaar  endfor
7305c73622aSBram Moolenaar endif
731a6878375SBram Moolenaar if (g:vimsyn_embed =~ 't' && has("tcl")) && filereadable(s:tclpath)
732071d4279SBram Moolenaar  unlet! b:current_syntax
7335c73622aSBram Moolenaar  exe "syn include @vimTclScript ".s:tclpath
734a0f849eeSBram Moolenaar  VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimTclScript
735a0f849eeSBram Moolenaar  VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+	contains=@vimTclScript
7365c73622aSBram Moolenaar  syn cluster vimFuncBodyList	add=vimTclScript
737c236c16dSBram Moolenaar else
738c236c16dSBram Moolenaar  syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
739c236c16dSBram Moolenaar  syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
7403577c6faSBram Moolenaar endif
7415c73622aSBram Moolenaar unlet s:tclpath
742a6878375SBram Moolenaarelse
743a6878375SBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
744a6878375SBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
745a6878375SBram Moolenaarendif
746a6878375SBram Moolenaarunlet s:trytcl
747071d4279SBram Moolenaar
7488299df96SBram Moolenaar" [-- mzscheme --] {{{3
749adc2182cSBram Moolenaarlet s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim")
7505c73622aSBram Moolenaarif !filereadable(s:mzschemepath)
751a0f849eeSBram Moolenaar for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n")
752a0f849eeSBram Moolenaar  if filereadable(fnameescape(s:mzschemepath))
753a0f849eeSBram Moolenaar   let s:mzschemepath= fnameescape(s:mzschemepath)
7549da7ff70SBram Moolenaar   break
7559da7ff70SBram Moolenaar  endif
7569da7ff70SBram Moolenaar endfor
7575c73622aSBram Moolenaarendif
7585c73622aSBram Moolenaarif (g:vimsyn_embed =~ 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
7598299df96SBram Moolenaar unlet! b:current_syntax
7608299df96SBram Moolenaar let iskKeep= &isk
7615c73622aSBram Moolenaar exe "syn include @vimMzSchemeScript ".s:mzschemepath
7628299df96SBram Moolenaar let &isk= iskKeep
763a0f849eeSBram Moolenaar VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+	contains=@vimMzSchemeScript
764a0f849eeSBram Moolenaar VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+		contains=@vimMzSchemeScript
7655c73622aSBram Moolenaar syn cluster vimFuncBodyList	add=vimMzSchemeRegion
766c236c16dSBram Moolenaarelse
767c236c16dSBram Moolenaar syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+
768c236c16dSBram Moolenaar syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+
7693577c6faSBram Moolenaarendif
7705c73622aSBram Moolenaarunlet s:mzschemepath
7718299df96SBram Moolenaar
772cfbc5ee4SBram Moolenaar" Synchronize (speed) {{{2
773071d4279SBram Moolenaar"============
7743577c6faSBram Moolenaarif exists("g:vimsyn_minlines")
7753577c6faSBram Moolenaar exe "syn sync minlines=".g:vimsyn_minlines
776071d4279SBram Moolenaarendif
7773577c6faSBram Moolenaarif exists("g:vimsyn_maxlines")
7783577c6faSBram Moolenaar exe "syn sync maxlines=".g:vimsyn_maxlines
779071d4279SBram Moolenaarelse
780071d4279SBram Moolenaar syn sync maxlines=60
781071d4279SBram Moolenaarendif
782071d4279SBram Moolenaarsyn sync linecont	"^\s\+\\"
783071d4279SBram Moolenaarsyn sync match vimAugroupSyncA	groupthere NONE	"\<aug\%[roup]\>\s\+[eE][nN][dD]"
784071d4279SBram Moolenaar
7855c73622aSBram Moolenaar" ====================
786cfbc5ee4SBram Moolenaar" Highlighting Settings {{{2
787071d4279SBram Moolenaar" ====================
788071d4279SBram Moolenaar
7893577c6faSBram Moolenaarif !exists("g:vimsyn_noerror")
790cfbc5ee4SBram Moolenaar hi def link vimBehaveError	vimError
791cfbc5ee4SBram Moolenaar hi def link vimCollClassErr	vimError
792cfbc5ee4SBram Moolenaar hi def link vimErrSetting	vimError
793c236c16dSBram Moolenaar hi def link vimEmbedError	vimError
794cfbc5ee4SBram Moolenaar hi def link vimFTError	vimError
795cfbc5ee4SBram Moolenaar hi def link vimFunctionError	vimError
7968299df96SBram Moolenaar hi def link vimFunc         	vimError
797cfbc5ee4SBram Moolenaar hi def link vimHiAttribList	vimError
798cfbc5ee4SBram Moolenaar hi def link vimHiCtermError	vimError
799cfbc5ee4SBram Moolenaar hi def link vimHiKeyError	vimError
800cfbc5ee4SBram Moolenaar hi def link vimKeyCodeError	vimError
801cfbc5ee4SBram Moolenaar hi def link vimMapModErr	vimError
802cfbc5ee4SBram Moolenaar hi def link vimSubstFlagErr	vimError
803cfbc5ee4SBram Moolenaar hi def link vimSynCaseError	vimError
8043577c6faSBram Moolenaar hi def link vimBufnrWarn	vimWarn
805cfbc5ee4SBram Moolenaarendif
806cfbc5ee4SBram Moolenaar
807e37d50a5SBram Moolenaarhi def link vimAbb	vimCommand
808cfbc5ee4SBram Moolenaarhi def link vimAddress	vimMark
809a0f849eeSBram Moolenaarhi def link vimAugroupError	vimError
810071d4279SBram Moolenaarhi def link vimAugroupKey	vimCommand
81183d1b190SBram Moolenaarhi def link vimAuHighlight	vimHighlight
812071d4279SBram Moolenaarhi def link vimAutoCmdOpt	vimOption
813071d4279SBram Moolenaarhi def link vimAutoCmd	vimCommand
81483d1b190SBram Moolenaarhi def link vimAutoEvent	Type
815071d4279SBram Moolenaarhi def link vimAutoSet	vimCommand
81683d1b190SBram Moolenaarhi def link vimBehaveModel	vimBehave
817071d4279SBram Moolenaarhi def link vimBehave	vimCommand
81883d1b190SBram Moolenaarhi def link vimBracket	Delimiter
81983d1b190SBram Moolenaarhi def link vimCmplxRepeat	SpecialChar
82083d1b190SBram Moolenaarhi def link vimCommand	Statement
82183d1b190SBram Moolenaarhi def link vimComment	Comment
822071d4279SBram Moolenaarhi def link vimCommentString	vimString
82383d1b190SBram Moolenaarhi def link vimCommentTitle	PreProc
824071d4279SBram Moolenaarhi def link vimCondHL	vimCommand
82583d1b190SBram Moolenaarhi def link vimContinue	Special
82683d1b190SBram Moolenaarhi def link vimCtrlChar	SpecialChar
827071d4279SBram Moolenaarhi def link vimEchoHLNone	vimGroup
828071d4279SBram Moolenaarhi def link vimEchoHL	vimCommand
82983d1b190SBram Moolenaarhi def link vimElseIfErr	Error
830071d4279SBram Moolenaarhi def link vimElseif	vimCondHL
83183d1b190SBram Moolenaarhi def link vimEnvvar	PreProc
83283d1b190SBram Moolenaarhi def link vimError	Error
83383d1b190SBram Moolenaarhi def link vimFBVar	vimVar
834071d4279SBram Moolenaarhi def link vimFgBgAttrib	vimHiAttrib
83583d1b190SBram Moolenaarhi def link vimFold	Folded
836071d4279SBram Moolenaarhi def link vimFTCmd	vimCommand
837071d4279SBram Moolenaarhi def link vimFTOption	vimSynType
838071d4279SBram Moolenaarhi def link vimFuncKey	vimCommand
83983d1b190SBram Moolenaarhi def link vimFuncName	Function
84083d1b190SBram Moolenaarhi def link vimFuncSID	Special
84183d1b190SBram Moolenaarhi def link vimFuncVar	Identifier
842071d4279SBram Moolenaarhi def link vimGroupAdd	vimSynOption
8436be7f873SBram Moolenaarhi def link vimGroupName	vimGroup
844071d4279SBram Moolenaarhi def link vimGroupRem	vimSynOption
84583d1b190SBram Moolenaarhi def link vimGroupSpecial	Special
84683d1b190SBram Moolenaarhi def link vimGroup	Type
84783d1b190SBram Moolenaarhi def link vimHiAttrib	PreProc
8486be7f873SBram Moolenaarhi def link vimHiClear	vimHighlight
849071d4279SBram Moolenaarhi def link vimHiCtermFgBg	vimHiTerm
850071d4279SBram Moolenaarhi def link vimHiCTerm	vimHiTerm
851071d4279SBram Moolenaarhi def link vimHighlight	vimCommand
852071d4279SBram Moolenaarhi def link vimHiGroup	vimGroupName
853071d4279SBram Moolenaarhi def link vimHiGuiFgBg	vimHiTerm
854071d4279SBram Moolenaarhi def link vimHiGuiFont	vimHiTerm
855071d4279SBram Moolenaarhi def link vimHiGuiRgb	vimNumber
856071d4279SBram Moolenaarhi def link vimHiGui	vimHiTerm
85783d1b190SBram Moolenaarhi def link vimHiNmbr	Number
858071d4279SBram Moolenaarhi def link vimHiStartStop	vimHiTerm
85983d1b190SBram Moolenaarhi def link vimHiTerm	Type
860071d4279SBram Moolenaarhi def link vimHLGroup	vimGroup
86183d1b190SBram Moolenaarhi def link vimHLMod	PreProc
862071d4279SBram Moolenaarhi def link vimInsert	vimString
86313d5aeefSBram Moolenaarhi def link vimIskSep	Delimiter
864071d4279SBram Moolenaarhi def link vimKeyCode	vimSpecFile
86583d1b190SBram Moolenaarhi def link vimKeyword	Statement
866071d4279SBram Moolenaarhi def link vimLet	vimCommand
867071d4279SBram Moolenaarhi def link vimLineComment	vimComment
868071d4279SBram Moolenaarhi def link vimMapBang	vimCommand
869071d4279SBram Moolenaarhi def link vimMapModKey	vimFuncSID
870071d4279SBram Moolenaarhi def link vimMapMod	vimBracket
871071d4279SBram Moolenaarhi def link vimMap	vimCommand
87283d1b190SBram Moolenaarhi def link vimMark	Number
873071d4279SBram Moolenaarhi def link vimMarkNumber	vimNumber
874071d4279SBram Moolenaarhi def link vimMenuMod	vimMapMod
875071d4279SBram Moolenaarhi def link vimMenuNameMore	vimMenuName
87683d1b190SBram Moolenaarhi def link vimMenuName	PreProc
877071d4279SBram Moolenaarhi def link vimMtchComment	vimComment
87805159a0cSBram Moolenaarhi def link vimNorm	vimCommand
87983d1b190SBram Moolenaarhi def link vimNotation	Special
8805c73622aSBram Moolenaarhi def link vimNotFunc	vimCommand
881071d4279SBram Moolenaarhi def link vimNotPatSep	vimString
88283d1b190SBram Moolenaarhi def link vimNumber	Number
88383d1b190SBram Moolenaarhi def link vimOperError	Error
88483d1b190SBram Moolenaarhi def link vimOper	Operator
88583d1b190SBram Moolenaarhi def link vimOption	PreProc
88683d1b190SBram Moolenaarhi def link vimParenSep	Delimiter
887071d4279SBram Moolenaarhi def link vimPatSepErr	vimPatSep
8885c73622aSBram Moolenaarhi def link vimPatSepR	vimPatSep
88983d1b190SBram Moolenaarhi def link vimPatSep	SpecialChar
890071d4279SBram Moolenaarhi def link vimPatSepZone	vimString
8915c73622aSBram Moolenaarhi def link vimPatSepZ	vimPatSep
89283d1b190SBram Moolenaarhi def link vimPattern	Type
893071d4279SBram Moolenaarhi def link vimPlainMark	vimMark
894071d4279SBram Moolenaarhi def link vimPlainRegister	vimRegister
89583d1b190SBram Moolenaarhi def link vimRegister	SpecialChar
89683d1b190SBram Moolenaarhi def link vimScriptDelim	Comment
89783d1b190SBram Moolenaarhi def link vimSearchDelim	Statement
898e2f98b95SBram Moolenaarhi def link vimSearch	vimString
89983d1b190SBram Moolenaarhi def link vimSep	Delimiter
900071d4279SBram Moolenaarhi def link vimSetMod	vimOption
90183d1b190SBram Moolenaarhi def link vimSetSep	Statement
902071d4279SBram Moolenaarhi def link vimSetString	vimString
90383d1b190SBram Moolenaarhi def link vimSpecFile	Identifier
904071d4279SBram Moolenaarhi def link vimSpecFileMod	vimSpecFile
90583d1b190SBram Moolenaarhi def link vimSpecial	Type
90683d1b190SBram Moolenaarhi def link vimStatement	Statement
907071d4279SBram Moolenaarhi def link vimStringCont	vimString
90883d1b190SBram Moolenaarhi def link vimString	String
90983d1b190SBram Moolenaarhi def link vimSubst1	vimSubst
91083d1b190SBram Moolenaarhi def link vimSubstDelim	Delimiter
91183d1b190SBram Moolenaarhi def link vimSubstFlags	Special
91283d1b190SBram Moolenaarhi def link vimSubstSubstr	SpecialChar
913071d4279SBram Moolenaarhi def link vimSubstTwoBS	vimString
914071d4279SBram Moolenaarhi def link vimSubst	vimCommand
91583d1b190SBram Moolenaarhi def link vimSynCaseError	Error
91683d1b190SBram Moolenaarhi def link vimSynCase	Type
91783d1b190SBram Moolenaarhi def link vimSyncC	Type
91883d1b190SBram Moolenaarhi def link vimSyncError	Error
919071d4279SBram Moolenaarhi def link vimSyncGroupName	vimGroupName
920071d4279SBram Moolenaarhi def link vimSyncGroup	vimGroupName
92183d1b190SBram Moolenaarhi def link vimSyncKey	Type
92283d1b190SBram Moolenaarhi def link vimSyncNone	Type
923071d4279SBram Moolenaarhi def link vimSynContains	vimSynOption
92483d1b190SBram Moolenaarhi def link vimSynError	Error
925071d4279SBram Moolenaarhi def link vimSynKeyContainedin	vimSynContains
926071d4279SBram Moolenaarhi def link vimSynKeyOpt	vimSynOption
927071d4279SBram Moolenaarhi def link vimSynMtchGrp	vimSynOption
928071d4279SBram Moolenaarhi def link vimSynMtchOpt	vimSynOption
929071d4279SBram Moolenaarhi def link vimSynNextgroup	vimSynOption
930071d4279SBram Moolenaarhi def link vimSynNotPatRange	vimSynRegPat
93183d1b190SBram Moolenaarhi def link vimSynOption	Special
932071d4279SBram Moolenaarhi def link vimSynPatRange	vimString
933071d4279SBram Moolenaarhi def link vimSynRegOpt	vimSynOption
934071d4279SBram Moolenaarhi def link vimSynRegPat	vimString
93583d1b190SBram Moolenaarhi def link vimSynReg	Type
936071d4279SBram Moolenaarhi def link vimSyntax	vimCommand
937071d4279SBram Moolenaarhi def link vimSynType	vimSpecial
93883d1b190SBram Moolenaarhi def link vimTodo	Todo
9395c73622aSBram Moolenaarhi def link vimUnmap	vimMap
94083d1b190SBram Moolenaarhi def link vimUserAttrbCmpltFunc	Special
941071d4279SBram Moolenaarhi def link vimUserAttrbCmplt	vimSpecial
942071d4279SBram Moolenaarhi def link vimUserAttrbKey	vimOption
943071d4279SBram Moolenaarhi def link vimUserAttrb	vimSpecial
944b4ff518dSBram Moolenaarhi def link vimUserAttrbError	Error
945e2719096SBram Moolenaarhi def link vimUserCmdError	Error
94683d1b190SBram Moolenaarhi def link vimUserCommand	vimCommand
9475c73622aSBram Moolenaarhi def link vimUserFunc	Normal
9486be7f873SBram Moolenaarhi def link vimVar	Identifier
9493577c6faSBram Moolenaarhi def link vimWarn	WarningMsg
950071d4279SBram Moolenaar
951cfbc5ee4SBram Moolenaar" Current Syntax Variable: {{{2
952071d4279SBram Moolenaarlet b:current_syntax = "vim"
9536be7f873SBram Moolenaar
9546be7f873SBram Moolenaar" ---------------------------------------------------------------------
9556be7f873SBram Moolenaar" Cleanup: {{{1
956a0f849eeSBram Moolenaardelc VimFolda
957a0f849eeSBram Moolenaardelc VimFoldf
958a0f849eeSBram Moolenaardelc VimFoldl
959a0f849eeSBram Moolenaardelc VimFoldm
960a0f849eeSBram Moolenaardelc VimFoldp
961a0f849eeSBram Moolenaardelc VimFoldP
962a0f849eeSBram Moolenaardelc VimFoldr
963a0f849eeSBram Moolenaardelc VimFoldt
9646be7f873SBram Moolenaarlet &cpo = s:keepcpo
9656be7f873SBram Moolenaarunlet s:keepcpo
966071d4279SBram Moolenaar" vim:ts=18  fdm=marker
967