blob: debed2bea8dc7e99a7003ea79dc064de20f9c8f8 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
dkearns982e1912024-03-28 20:06:03 +11002" Language: Vim script
3" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
4" Doug Kearns <dougkearns@gmail.com>
Doug Kearnsa577e422025-05-17 16:29:13 +02005" Last Change: 2025 May 16
Christian Brabandtf9ca1392024-02-19 20:37:11 +01006" Former Maintainer: Charles E. Campbell
h-east9b53c052024-02-13 21:09:22 +01007
8" DO NOT CHANGE DIRECTLY.
9" THIS FILE PARTLY GENERATED BY gen_syntax_vim.vim.
10" (Search string "GEN_SYN_VIM:" in this file)
11
Doug Kearns3dca5122025-03-09 16:30:28 +010012" Quit when a syntax file was already loaded {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +000013if exists("b:current_syntax")
14 finish
15endif
Bram Moolenaar113cb512021-11-07 20:27:04 +000016let s:keepcpo= &cpo
Bram Moolenaar6be7f872012-01-20 21:08:56 +010017set cpo&vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
Doug Kearns3dca5122025-03-09 16:30:28 +010019" Feature testing {{{1
20
dkearns04e53632024-04-11 06:18:37 +100021let s:vim9script = "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>'
22
Doug Kearns3dca5122025-03-09 16:30:28 +010023function s:has(feature)
24 return has(a:feature) || index(get(g:, "vimsyn_vim_features", []), a:feature) != -1
25endfunction
26
27" Automatically generated keyword lists: {{{1
28
Bram Moolenaar071d4272004-06-13 20:20:40 +000029" vimTodo: contains common special-notices for comments {{{2
30" Use the vimCommentGroup cluster to add your own.
Bram Moolenaare2719092015-01-10 15:09:25 +010031syn keyword vimTodo contained COMBAK FIXME TODO XXX
Bram Moolenaar217ad922005-03-20 22:37:15 +000032syn cluster vimCommentGroup contains=vimTodo,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000033
34" regular vim commands {{{2
Doug Kearns1718e7d2025-01-08 18:20:47 +010035" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang'
36syn keyword vimCommand contained abo[veleft] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] comp[iler] con[tinue] conf[irm] nextgroup=vimBang
Doug Kearnsc29b5332025-04-26 20:14:15 +020037syn keyword vimCommand contained cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] defc[ompile] defe[r] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] endt[ry] endw[hile] ene[w] ev[al] ex exi[t] exu[sage] f[ile] files filet[ype] fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] hor[izontal] ij[ump] il[ist] imp[ort] int[ro] ip[ut] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] nextgroup=vimBang
Doug Kearnsa577e422025-05-17 16:29:13 +020038syn keyword vimCommand contained keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] ma[rk] marks menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] nextgroup=vimBang
39syn keyword vimCommand contained pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sil[ent] sla[st] sn[ext] so[urce] sp[lit] spe[llgood] spelld[ump] nextgroup=vimBang
40syn keyword vimCommand contained spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] ter[minal] tf[irst] tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winc[md] wind[o] winp[os] nextgroup=vimBang
41syn keyword vimCommand contained wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang
h-east9b53c052024-02-13 21:09:22 +010042
Aliaksei Budaveidfcef892024-02-18 21:02:14 +030043" Lower priority for _new_ to distinguish constructors from the command.
44syn match vimCommand contained "\<new\>(\@!"
Bram Moolenaare2719092015-01-10 15:09:25 +010045syn match vimCommand contained "\<z[-+^.=]\=\>"
h-east9b53c052024-02-13 21:09:22 +010046syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man Over Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
Bram Moolenaar071d4272004-06-13 20:20:40 +000047
48" vimOptions are caught only when contained in a vimSet {{{2
Doug Kearnsddbb6fe2024-07-24 20:21:22 +020049" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod'
64-bitman88d41ab2025-04-06 17:20:39 +020050syn keyword vimOption contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert chi chistory cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible cpt complete cfu completefunc skipwhite nextgroup=vimSetEqual,vimSetMod
glepnirf31cfa22025-03-06 21:59:13 +010051syn keyword vimOption contained cfc completefuzzycollect cia completeitemalign cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore eiw eventignorewin et expandtab ex exrc fenc fileencoding skipwhite nextgroup=vimSetEqual,vimSetMod
52syn keyword vimOption contained fencs fileencodings ff fileformat ffs fileformats fic fileignorecase ft filetype fcs fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey skipwhite nextgroup=vimSetEqual,vimSetMod
Doug Kearnsc29b5332025-04-26 20:14:15 +020053syn keyword vimOption contained imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode ise isexpand isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lhi lhistory lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot mis menuitems mopt messagesopt skipwhite nextgroup=vimSetEqual,vimSetMod
54syn keyword vimOption contained msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pmw pummaxwidth pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome skipwhite nextgroup=vimSetEqual,vimSetMod
Naruhiko Nishinobe5bd4d2025-05-14 21:20:28 +020055syn keyword vimOption contained pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline stpl showtabpanel ss sidescroll siso sidescrolloff skipwhite nextgroup=vimSetEqual,vimSetMod
56syn keyword vimOption contained scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax tpl tabpanel tplo tabpanelopt ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout skipwhite nextgroup=vimSetEqual,vimSetMod
57syn keyword vimOption contained tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth wrap wm wrapmargin ws wrapscan write wa writeany skipwhite nextgroup=vimSetEqual,vimSetMod
58syn keyword vimOption contained wb writebackup wd writedelay xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod
Bram Moolenaar071d4272004-06-13 20:20:40 +000059
60" vimOptions: These are the turn-off setting variants {{{2
h-east9b53c052024-02-13 21:09:22 +010061" GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR=''
62syn keyword vimOption contained noari noallowrevins noarab noarabic noarshape noarabicshape noacd noautochdir noai noautoindent noar noautoread noasd noautoshelldir noaw noautowrite noawa noautowriteall nobk nobackup nobeval noballooneval nobevalterm noballoonevalterm nobin nobinary nobomb nobri nobreakindent nobl nobuflisted nocdh nocdhome nocin nocindent nocp nocompatible nocf noconfirm noci nocopyindent nocsre nocscoperelative nocst nocscopetag nocsverb nocscopeverbose nocrb nocursorbind nocuc nocursorcolumn nocul nocursorline nodeco nodelcombine nodiff nodg nodigraph noed noedcompatible noemo noemoji noeof noendoffile noeol noendofline noea noequalalways noeb noerrorbells noek noesckeys noet noexpandtab noex noexrc nofic nofileignorecase nofixeol nofixendofline
63syn keyword vimOption contained nofen nofoldenable nofs nofsync nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkp nohkmapp nohls nohlsearch noicon noic noignorecase noimc noimcmdline noimd noimdisable nois noincsearch noinf noinfercase noim noinsertmode nojs nojoinspaces nolnr nolangnoremap nolrm nolangremap nolz nolazyredraw nolbr nolinebreak nolisp nolist nolpl noloadplugins nomagic noml nomodeline nomle nomodelineexpr noma nomodifiable nomod nomodified nomore nomousef nomousefocus nomh nomousehide nomousemev nomousemoveevent nonu nonumber noodev noopendevice nopaste nopi nopreserveindent nopvw nopreviewwindow noprompt noro noreadonly nornu norelativenumber noremap nors norestorescreen nori norevins norl norightleft noru noruler noscb noscrollbind noscf noscrollfocus
dkearns691aee82024-03-04 05:02:47 +110064syn keyword vimOption contained nosecure nossl noshellslash nostmp noshelltemp nosr noshiftround nosn noshortname nosc noshowcmd nosft noshowfulltag nosm noshowmatch nosmd noshowmode noscs nosmartcase nosi nosmartindent nosta nosmarttab nosms nosmoothscroll nospell nosb nosplitbelow nospr nosplitright nosol nostartofline noswf noswapfile notbs notagbsearch notr notagrelative notgst notagstack notbidi notermbidi notgc notermguicolors noterse nota notextauto notx notextmode notop notildeop noto notimeout notitle nottimeout notbi nottybuiltin notf nottyfast noudf noundofile novb novisualbell nowarn nowiv noweirdinvert nowic nowildignorecase nowmnu nowildmenu nowfb nowinfixbuf nowfh nowinfixheight nowfw nowinfixwidth nowrap nows nowrapscan nowrite nowa nowriteany
65syn keyword vimOption contained nowb nowritebackup noxtermcodes
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
67" vimOptions: These are the invertible variants {{{2
h-east9b53c052024-02-13 21:09:22 +010068" GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR=''
69syn keyword vimOption contained invari invallowrevins invarab invarabic invarshape invarabicshape invacd invautochdir invai invautoindent invar invautoread invasd invautoshelldir invaw invautowrite invawa invautowriteall invbk invbackup invbeval invballooneval invbevalterm invballoonevalterm invbin invbinary invbomb invbri invbreakindent invbl invbuflisted invcdh invcdhome invcin invcindent invcp invcompatible invcf invconfirm invci invcopyindent invcsre invcscoperelative invcst invcscopetag invcsverb invcscopeverbose invcrb invcursorbind invcuc invcursorcolumn invcul invcursorline invdeco invdelcombine invdiff invdg invdigraph inved invedcompatible invemo invemoji inveof invendoffile inveol invendofline invea invequalalways inveb inverrorbells invek invesckeys
70syn keyword vimOption contained invet invexpandtab invex invexrc invfic invfileignorecase invfixeol invfixendofline invfen invfoldenable invfs invfsync invgd invgdefault invguipty invhid invhidden invhk invhkmap invhkp invhkmapp invhls invhlsearch invicon invic invignorecase invimc invimcmdline invimd invimdisable invis invincsearch invinf invinfercase invim invinsertmode invjs invjoinspaces invlnr invlangnoremap invlrm invlangremap invlz invlazyredraw invlbr invlinebreak invlisp invlist invlpl invloadplugins invmagic invml invmodeline invmle invmodelineexpr invma invmodifiable invmod invmodified invmore invmousef invmousefocus invmh invmousehide invmousemev invmousemoveevent invnu invnumber invodev invopendevice invpaste invpi invpreserveindent invpvw invpreviewwindow
71syn keyword vimOption contained invprompt invro invreadonly invrnu invrelativenumber invremap invrs invrestorescreen invri invrevins invrl invrightleft invru invruler invscb invscrollbind invscf invscrollfocus invsecure invssl invshellslash invstmp invshelltemp invsr invshiftround invsn invshortname invsc invshowcmd invsft invshowfulltag invsm invshowmatch invsmd invshowmode invscs invsmartcase invsi invsmartindent invsta invsmarttab invsms invsmoothscroll invspell invsb invsplitbelow invspr invsplitright invsol invstartofline invswf invswapfile invtbs invtagbsearch invtr invtagrelative invtgst invtagstack invtbidi invtermbidi invtgc invtermguicolors invterse invta invtextauto invtx invtextmode invtop invtildeop invto invtimeout invtitle invttimeout invtbi invttybuiltin
dkearns691aee82024-03-04 05:02:47 +110072syn keyword vimOption contained invtf invttyfast invudf invundofile invvb invvisualbell invwarn invwiv invweirdinvert invwic invwildignorecase invwmnu invwildmenu invwfb invwinfixbuf invwfh invwinfixheight invwfw invwinfixwidth invwrap invws invwrapscan invwrite invwa invwriteany invwb invwritebackup invxtermcodes
Bram Moolenaar071d4272004-06-13 20:20:40 +000073" termcap codes (which can also be set) {{{2
Doug Kearnsddbb6fe2024-07-24 20:21:22 +020074" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod'
75syn keyword vimOption contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f t_8b t_8u t_xo skipwhite nextgroup=vimSetEqual,vimSetMod
h-east9b53c052024-02-13 21:09:22 +010076" term key codes
77syn keyword vimOption contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 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_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_ku
Bram Moolenaarb0d45e72017-11-05 18:19:24 +010078syn match vimOption contained "t_%1"
Bram Moolenaar071d4272004-06-13 20:20:40 +000079syn match vimOption contained "t_#2"
80syn match vimOption contained "t_#4"
Bram Moolenaar6d5ad4c2016-10-27 17:00:16 +020081syn match vimOption contained "t_@7"
Bram Moolenaarb0d45e72017-11-05 18:19:24 +010082syn match vimOption contained "t_*7"
83syn match vimOption contained "t_&8"
84syn match vimOption contained "t_%i"
Bram Moolenaar071d4272004-06-13 20:20:40 +000085syn match vimOption contained "t_k;"
86
Doug Kearns3dca5122025-03-09 16:30:28 +010087" vimOptions: These are the variable names {{{2
88" GEN_SYN_VIM: vimOption normal variable, START_STR='syn keyword vimOptionVarName contained', END_STR=''
64-bitman88d41ab2025-04-06 17:20:39 +020089syn keyword vimOptionVarName contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert chi chistory cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible cpt complete
90syn keyword vimOptionVarName contained cfu completefunc cfc completefuzzycollect cia completeitemalign cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore eiw eventignorewin et expandtab
91syn keyword vimOptionVarName contained ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase ft filetype fcs fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase
Doug Kearnsc29b5332025-04-26 20:14:15 +020092syn keyword vimOptionVarName contained imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode ise isexpand isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lhi lhistory lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern
93syn keyword vimOptionVarName contained mmt maxmemtot mis menuitems mopt messagesopt msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pmw pummaxwidth pw pumwidth
94syn keyword vimOptionVarName contained pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode
Naruhiko Nishinobe5bd4d2025-05-14 21:20:28 +020095syn keyword vimOptionVarName contained stal showtabline stpl showtabpanel ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax tpl tabpanel tplo tabpanelopt ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode
96syn keyword vimOptionVarName contained tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth
97syn keyword vimOptionVarName contained winptydll wiw winwidth wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes
Doug Kearns3dca5122025-03-09 16:30:28 +010098" GEN_SYN_VIM: vimOption term output code variable, START_STR='syn keyword vimOptionVarName contained', END_STR=''
99syn keyword vimOptionVarName contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f t_8b t_8u t_xo
100syn keyword vimOptionVarName contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 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_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_ku
101syn match vimOptionVarName contained "t_%1"
102syn match vimOptionVarName contained "t_#2"
103syn match vimOptionVarName contained "t_#4"
104syn match vimOptionVarName contained "t_@7"
105syn match vimOptionVarName contained "t_*7"
106syn match vimOptionVarName contained "t_&8"
107syn match vimOptionVarName contained "t_%i"
108syn match vimOptionVarName contained "t_k;"
109
Bram Moolenaar03413f42016-04-12 21:07:15 +0200110" unsupported settings: some were supported by vi but don't do anything in vim {{{2
h-east9b53c052024-02-13 21:09:22 +0100111" GEN_SYN_VIM: Missing vimOption, START_STR='syn keyword vimErrSetting contained', END_STR=''
112syn keyword vimErrSetting contained akm altkeymap anti antialias ap autoprint bf beautify biosk bioskey consk conskey fk fkmap fl flash gr graphic ht hardtabs macatsui mesg novice open opt optimize oft osfiletype redraw slow slowopen sourceany w1200 w300 w9600
113syn keyword vimErrSetting contained noakm noaltkeymap noanti noantialias noap noautoprint nobf nobeautify nobiosk nobioskey noconsk noconskey nofk nofkmap nofl noflash nogr nographic nomacatsui nomesg nonovice noopen noopt nooptimize noredraw noslow noslowopen nosourceany
114syn keyword vimErrSetting contained invakm invaltkeymap invanti invantialias invap invautoprint invbf invbeautify invbiosk invbioskey invconsk invconskey invfk invfkmap invfl invflash invgr invgraphic invmacatsui invmesg invnovice invopen invopt invoptimize invredraw invslow invslowopen invsourceany
Bram Moolenaar071d4272004-06-13 20:20:40 +0000115
Bram Moolenaar80a94a52006-02-23 21:26:58 +0000116" AutoCmd Events {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000117syn case ignore
Doug Kearnsfa3b1042025-04-22 19:48:13 +0200118" GEN_SYN_VIM: vimAutoEvent, START_STR='syn keyword vimAutoEvent contained', END_STR='skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern'
Doug Kearnsc29b5332025-04-26 20:14:15 +0200119syn 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 CmdlineChanged CmdlineEnter CmdlineLeave CmdlineLeavePre CmdUndefined CmdwinEnter CmdwinLeave ColorScheme ColorSchemePre CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedC CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern
120syn keyword vimAutoEvent contained FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre KeyInputPre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost SessionWritePost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabClosedPre TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TermResponseAll TextChanged TextChangedI TextChangedP TextChangedT TextYankPost VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinNewPre WinResized skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern
121syn keyword vimAutoEvent contained WinScrolled skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern
Doug Kearnsfa3b1042025-04-22 19:48:13 +0200122
123syn keyword vimAutoEvent contained User skipwhite nextgroup=vimUserAutoEvent
124syn match vimUserAutoEvent contained "\<\h\w*\>" skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern
Bram Moolenaar071d4272004-06-13 20:20:40 +0000125
126" Highlight commonly used Groupnames {{{2
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200127syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000128
129" Default highlighting groups {{{2
h-east9b53c052024-02-13 21:09:22 +0100130" GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR=''
Naruhiko Nishinobe5bd4d2025-05-14 21:20:28 +0200131syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText DiffTextAdd PmenuSbar TabLineSel TabLineFill TabPanel TabPanelSel TabPanelFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel PopupSelected MessageWindow PopupNotification Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM
132syn keyword vimHLGroup contained LineNrAbove LineNrBelow
Christian Brabandt393708c2024-05-27 15:50:07 +0200133syn match vimHLGroup contained "\<Conceal\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000134syn case match
135
136" Function Names {{{2
h-east9b53c052024-02-13 21:09:22 +0100137" GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR=''
Doug Kearns8dec6c22025-01-19 14:02:06 +0100138syn keyword vimFuncName contained abs acos add and append appendbufline argc argidx arglistid argv asin assert_beeps assert_equal assert_equalfile assert_exception assert_fails assert_false assert_inrange assert_match assert_nobeep assert_notequal assert_notmatch assert_report assert_true atan atan2 autocmd_add autocmd_delete autocmd_get balloon_gettext balloon_show balloon_split base64_decode base64_encode bindtextdomain blob2list blob2str browse browsedir bufadd bufexists buflisted bufload bufloaded bufname bufnr bufwinid bufwinnr byte2line byteidx byteidxcomp call ceil ch_canread ch_close ch_close_in ch_evalexpr ch_evalraw ch_getbufnr ch_getjob ch_info ch_log ch_logfile ch_open ch_read ch_readblob ch_readraw ch_sendexpr ch_sendraw ch_setoptions ch_status changenr
Doug Kearnsc29b5332025-04-26 20:14:15 +0200139syn keyword vimFuncName contained char2nr charclass charcol charidx chdir cindent clearmatches cmdcomplete_info col complete complete_add complete_check complete_info complete_match confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filecopy filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect
140syn keyword vimFuncName contained get getbufinfo getbufline getbufoneline getbufvar getcellpixels getcellwidths getchangelist getchar getcharmod getcharpos getcharsearch getcharstr getcmdcomplpat getcmdcompltype getcmdline getcmdpos getcmdprompt getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregionpos getregtype getscriptinfo getstacktrace gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget
141syn keyword vimFuncName contained histnr hlID hlexists hlget hlset hostname iconv id indent index indexof input inputdialog inputlist inputrestore inputsave inputsecret insert instanceof interrupt invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str list2tuple listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank
142syn keyword vimFuncName contained ngettext nr2char or pathshorten perleval popup_atcursor popup_beval popup_clear popup_close popup_create popup_dialog popup_filter_menu popup_filter_yesno popup_findecho popup_findinfo popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setbuf popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime
143syn keyword vimFuncName contained reltimefloat reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remote_startserver remove rename repeat resolve reverse round rubyeval screenattr screenchar screenchars screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent
144syn keyword vimFuncName contained sound_playfile sound_stop soundfold spellbadword spellsuggest split sqrt srand state str2blob str2float str2list str2nr strcharlen strcharpart strchars strdisplaywidth strftime strgetchar stridx string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill
145syn keyword vimFuncName contained term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon test_getvalue test_gui_event test_ignore_error test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_null_tuple test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc tuple2list type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid
146syn keyword vimFuncName contained win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview winwidth wordcount writefile xor
Doug Kearns3dca5122025-03-09 16:30:28 +0100147" Predefined variable names {{{2
148" GEN_SYN_VIM: vimVarName, START_STR='syn keyword vimVimVarName contained', END_STR=''
149syn keyword vimVimVarName contained count count1 prevcount errmsg warningmsg statusmsg shell_error this_session version lnum termresponse fname lang lc_time ctype charconvert_from charconvert_to fname_in fname_out fname_new fname_diff cmdarg foldstart foldend folddashes foldlevel progname servername dying exception throwpoint register cmdbang insertmode val key profiling fcs_reason fcs_choice beval_bufnr beval_winnr beval_winid beval_lnum beval_col beval_text scrollstart swapname swapchoice swapcommand char mouse_win mouse_winid mouse_lnum mouse_col operator searchforward hlsearch oldfiles windowid progpath completed_item option_new option_old option_oldlocal option_oldglobal option_command option_type errors false true none null numbermax numbermin numbersize
Yegappan Lakshmanan038be272025-03-26 18:46:21 +0100150syn keyword vimVimVarName contained vim_did_enter testing t_number t_string t_func t_list t_dict t_float t_bool t_none t_job t_channel t_blob t_class t_object termrfgresp termrbgresp termu7resp termstyleresp termblinkresp event versionlong echospace argv collate exiting colornames sizeofint sizeoflong sizeofpointer maxcol python3_version t_typealias t_enum t_enumvalue stacktrace t_tuple
Bram Moolenaar071d4272004-06-13 20:20:40 +0000151
Doug Kearns3dca5122025-03-09 16:30:28 +0100152"--- syntax here and above generated by runtime/syntax/generator/gen_syntax_vim.vim ---
153
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000154" Special Vim Highlighting (not automatic) {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000155
Doug Kearns3dca5122025-03-09 16:30:28 +0100156" Neovim keyword list additions {{{2
157
158if s:has("nvim")
159 syn keyword vimOptionVarName contained channel inccommand mousescroll pumblend redrawdebug scrollback shada shadafile statuscolumn termpastefilter termsync winbar winblend winhighlight
160 syn keyword vimVimVarName contained lua msgpack_types relnum stderr termrequest virtnum
161endif
162
Doug Kearnsd65e58f2024-07-17 19:34:14 +0200163" Set up commands for this syntax highlighting file {{{2
164
165com! -nargs=* Vim9 execute <q-args> s:vim9script ? "" : "contained"
166com! -nargs=* VimL execute <q-args> s:vim9script ? "contained" : ""
167
Doug Kearns818c6412024-10-06 17:00:48 +0200168if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[acefhiHlmpPrt]'
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200169 if g:vimsyn_folding =~# 'a'
170 com! -nargs=* VimFolda <args> fold
171 else
172 com! -nargs=* VimFolda <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100173 endif
Doug Kearns818c6412024-10-06 17:00:48 +0200174 if g:vimsyn_folding =~# 'c'
175 com! -nargs=* VimFoldc <args> fold
176 else
177 com! -nargs=* VimFoldc <args>
178 endif
179 if g:vimsyn_folding =~# 'e'
180 com! -nargs=* VimFolde <args> fold
181 else
182 com! -nargs=* VimFolde <args>
183 endif
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200184 if g:vimsyn_folding =~# 'f'
185 com! -nargs=* VimFoldf <args> fold
186 else
187 com! -nargs=* VimFoldf <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100188 endif
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +0100189 if g:vimsyn_folding =~# 'h'
190 com! -nargs=* VimFoldh <args> fold
191 else
192 com! -nargs=* VimFoldh <args>
193 endif
Doug Kearnsce064932024-04-13 18:24:01 +0200194 if g:vimsyn_folding =~# 'H'
195 com! -nargs=* VimFoldH <args> fold
196 else
197 com! -nargs=* VimFoldH <args>
198 endif
Doug Kearns818c6412024-10-06 17:00:48 +0200199 if g:vimsyn_folding =~# 'i'
200 com! -nargs=* VimFoldi <args> fold
201 else
202 com! -nargs=* VimFoldi <args>
203 endif
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200204 if g:vimsyn_folding =~# 'l'
205 com! -nargs=* VimFoldl <args> fold
206 else
207 com! -nargs=* VimFoldl <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100208 endif
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200209 if g:vimsyn_folding =~# 'm'
210 com! -nargs=* VimFoldm <args> fold
211 else
212 com! -nargs=* VimFoldm <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100213 endif
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200214 if g:vimsyn_folding =~# 'p'
215 com! -nargs=* VimFoldp <args> fold
216 else
217 com! -nargs=* VimFoldp <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100218 endif
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200219 if g:vimsyn_folding =~# 'P'
220 com! -nargs=* VimFoldP <args> fold
221 else
222 com! -nargs=* VimFoldP <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100223 endif
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200224 if g:vimsyn_folding =~# 'r'
225 com! -nargs=* VimFoldr <args> fold
226 else
227 com! -nargs=* VimFoldr <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100228 endif
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +0200229 if g:vimsyn_folding =~# 't'
230 com! -nargs=* VimFoldt <args> fold
231 else
232 com! -nargs=* VimFoldt <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100233 endif
234else
235 com! -nargs=* VimFolda <args>
Doug Kearns818c6412024-10-06 17:00:48 +0200236 com! -nargs=* VimFoldc <args>
237 com! -nargs=* VimFolde <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100238 com! -nargs=* VimFoldf <args>
Doug Kearns818c6412024-10-06 17:00:48 +0200239 com! -nargs=* VimFoldi <args>
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +0100240 com! -nargs=* VimFoldh <args>
Doug Kearnsce064932024-04-13 18:24:01 +0200241 com! -nargs=* VimFoldH <args>
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100242 com! -nargs=* VimFoldl <args>
243 com! -nargs=* VimFoldm <args>
244 com! -nargs=* VimFoldp <args>
245 com! -nargs=* VimFoldP <args>
246 com! -nargs=* VimFoldr <args>
247 com! -nargs=* VimFoldt <args>
248endif
249
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000250" Deprecated variable options {{{2
251if exists("g:vim_minlines")
252 let g:vimsyn_minlines= g:vim_minlines
253endif
254if exists("g:vim_maxlines")
255 let g:vimsyn_maxlines= g:vim_maxlines
256endif
257if exists("g:vimsyntax_noerror")
258 let g:vimsyn_noerror= g:vimsyntax_noerror
259endif
260
Bram Moolenaar03413f42016-04-12 21:07:15 +0200261" Variable options {{{2
262if exists("g:vim_maxlines")
263 let s:vimsyn_maxlines= g:vim_maxlines
264else
265 let s:vimsyn_maxlines= 60
266endif
267
Doug Kearnsd65e58f2024-07-17 19:34:14 +0200268" Nulls {{{2
269" =====
270Vim9 syn keyword vim9Null null null_blob null_channel null_class null_dict null_function null_job null_list null_object null_partial null_string
271
272" Booleans {{{2
273" ========
274Vim9 syn keyword vim9Boolean true false
275
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000276" Numbers {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000277" =======
dkearns5cd86c62024-03-12 07:40:58 +1100278syn case ignore
Doug Kearnse957cba2025-05-04 21:01:18 +0200279syn match vimNumber "\<\d\+\%('\d\+\)*" skipwhite nextgroup=@vimComment,vimSubscript,vimGlobal,vimSubst1
280syn match vimNumber "\<\d\+\%('\d\+\)*\.\d\+\%(e[+-]\=\d\+\)\=" skipwhite nextgroup=@vimComment
281syn match vimNumber "\<0b[01]\+\%('[01]\+\)*" skipwhite nextgroup=@vimComment,vimSubscript
282syn match vimNumber "\<0o\=\o\+\%('\o\+\)*" skipwhite nextgroup=@vimComment,vimSubscript
283syn match vimNumber "\<0x\x\+\%('\x\+\)*" skipwhite nextgroup=@vimComment,vimSubscript
284syn match vimNumber '\<0z\>' skipwhite nextgroup=@vimComment
285syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vimComment,vimSubscript
dkearns5cd86c62024-03-12 07:40:58 +1100286syn case match
Bram Moolenaar071d4272004-06-13 20:20:40 +0000287
Bram Moolenaar6c1e1572019-06-22 02:13:00 +0200288" All vimCommands are contained by vimIsCommand. {{{2
Doug Kearnsa577e422025-05-17 16:29:13 +0200289syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimFor,vimFunction,vimFuncFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimThrow,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
h-east61397662025-01-03 17:32:54 +0100290syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
Doug Kearns60bd1402025-02-27 19:15:20 +0100291syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
292syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
Doug Kearns4a530a62025-02-03 18:59:09 +0100293syn match vimCount contained "\d\+"
Doug Kearns1718e7d2025-01-08 18:20:47 +0100294syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" nextgroup=vimBang contains=vimCommand
Doug Kearns3c07eb02024-09-02 10:03:37 +0200295syn match vimBang contained "!"
Doug Kearnsc29b5332025-04-26 20:14:15 +0200296syn match vimWhitespace contained "\s\+"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000297
Doug Kearns1aa287e2025-02-10 22:00:27 +0100298syn region vimSubscript contained matchgroup=vimSubscriptBracket start="\[" end="]" nextgroup=vimSubscript contains=@vimExprList
299
300syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vim9Super,vim9This
Doug Kearns3dca5122025-03-09 16:30:28 +0100301syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vimVarScope
302syn match vimVar "\<a:\%(000\|1\=[0-9]\|20\)\>" nextgroup=vimSubscript contains=vimVarScope
303syn match vimFBVar contained "\<[bwglsta]:\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vimVarScope
Doug Kearns1aa287e2025-02-10 22:00:27 +0100304
Doug Kearns3dca5122025-03-09 16:30:28 +0100305" match the scope prefix independently of the retrofitted scope dictionary
306syn match vimVarScope contained "\<[bwglstav]:"
307syn match vimVimVar contained "\<[bwglstav]:\%(\h\|\d\)\@!" nextgroup=vimSubscript
308
309syn match vimVarNameError contained "\<\h\w*\>"
310syn match vimVimVar "\<v:" nextgroup=vimSubscript,vimVimVarName,vimVarNameError
311syn match vimOptionVar "&\%([lg]:\)\=" nextgroup=vimSubscript,vimOptionVarName,vimVarNameError
Doug Kearns1aa287e2025-02-10 22:00:27 +0100312syn cluster vimSpecialVar contains=vimEnvvar,vimLetRegister,vimOptionVar,vimVimVar
313
314Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\=="
315Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.="
316Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+=<<"
317Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s*->" contains=vim9Super,vim9This
318Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\[" nextgroup=vimSubscript
319Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\." nextgroup=vimOper contains=vim9Super,vim9This
320
321Vim9 syn match vim9LhsVariableList "\[\_[^]]\+]\ze\s\+[-+/*%]\==" contains=vimVar,@vimSpecialVar
322Vim9 syn match vim9LhsVariableList "\[\_[^]]\+]\ze\s\+\.\.=" contains=vimVar,@vimSpecialVar
323
324Vim9 syn match vim9LhsRegister "@["0-9\-a-zA-Z#=*+_/]\ze\s\+\%(\.\.\)\=="
325
326syn cluster vimExprList contains=@vimSpecialVar,vimFunc,vimNumber,vimOper,vimOperParen,vimLambda,vimString,vimVar,@vim9ExprList
327syn cluster vim9ExprList contains=vim9Boolean,vim9LambdaParams,vim9Null
dkearnsb1427b42024-02-28 05:59:30 +1100328
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000329" Insertions And Appends: insert append {{{2
Bram Moolenaar519cc552021-11-16 19:18:26 +0000330" (buftype != nofile test avoids having append, change, insert show up in the command window)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331" =======================
Bram Moolenaar519cc552021-11-16 19:18:26 +0000332if &buftype != 'nofile'
dkearns4ba70ca2024-04-15 04:32:56 +1000333 syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$" extend
334 syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$" extend
335 syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$" extend
Bram Moolenaar519cc552021-11-16 19:18:26 +0000336endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000338" Behave! {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000339" =======
Bram Moolenaar6be7f872012-01-20 21:08:56 +0100340if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000341 syn match vimBehaveError contained "[^ ]\+"
342endif
Doug Kearnsfe6d5b02024-02-14 21:17:43 +0100343syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vimBehaveError skipwhite
344syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite
345syn keyword vimBehaveModel contained mswin xterm
Bram Moolenaar071d4272004-06-13 20:20:40 +0000346
Doug Kearns99984fc2024-07-18 20:45:19 +0200347" Call {{{2
348" ====
349syn match vimCall "\<call\=\>" skipwhite nextgroup=vimFunc
350
Doug Kearnsa9c06422025-02-12 20:44:17 +0100351" Debuggreedy {{{2
Doug Kearns4a530a62025-02-03 18:59:09 +0100352" ===========
353" TODO: special-cased until generalised range/count support is implemented
354syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount
355
dkearnsa3bddb72024-06-14 01:48:10 +1000356" Exception Handling {{{2
357syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList
358syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern
359syn region vimCatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline
360
Doug Kearns818c6412024-10-06 17:00:48 +0200361" Export {{{2
362" ======
363if s:vim9script
364 syn keyword vim9Export export skipwhite nextgroup=vim9Abstract,vim9ClassBody,vim9Const,vim9Def,vim9EnumBody,vim9Final,vim9InterfaceBody,vim9Type,vim9Var
365endif
366
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000367" Filetypes {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000368" =========
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000369syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError
Bram Moolenaar6be7f872012-01-20 21:08:56 +0100370if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000371 syn match vimFTError contained "\I\i*"
372endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000373syn keyword vimFTCmd contained filet[ype]
374syn keyword vimFTOption contained detect indent off on plugin
375
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000376" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000377" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
Doug Kearns1aa287e2025-02-10 22:00:27 +0100378syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimContinue
Doug Kearnsfa3b1042025-04-22 19:48:13 +0200379
380" define
381VimFolda syn region vimAugroup
382 \ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+"
383 \ matchgroup=vimAugroupKey
384 \ end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"
385 \ skipwhite nextgroup=vimAugroupEnd
386 \ contains=vimAutocmd,@vimAugroupList,vimAugroupkey
Bram Moolenaar6be7f872012-01-20 21:08:56 +0100387if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
Doug Kearnsfa3b1042025-04-22 19:48:13 +0200388 syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000389endif
dkearnsc4aef9a2024-03-04 02:42:47 +1100390
Doug Kearnsfa3b1042025-04-22 19:48:13 +0200391" TODO: Vim9 comment
392syn match vimAugroupName contained "\%(\\["|[:space:]]\|[^"|[:space:]]\)\+"
Doug Kearnsc29b5332025-04-26 20:14:15 +0200393 \ skipwhite nextgroup=vimCmdSep,vimComment
394syn match vimAugroupEnd contained "\c\<END\>" skipwhite nextgroup=vimCmdSep,vimComment
Doug Kearnsfa3b1042025-04-22 19:48:13 +0200395syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAugroupName
396syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAugroupName,vimAugroupEnd
Bram Moolenaar071d4272004-06-13 20:20:40 +0000397
Doug Kearnsfa3b1042025-04-22 19:48:13 +0200398" remove
399syn match vimAugroup "\<aug\%[roup]!" skipwhite nextgroup=vimAugroupName contains=vimAugroupKey,vimAugroupBang
400
401" list
402VimL syn match vimAugroup "\<aug\%[roup]\>\ze\s*\%(["|]\|$\)" skipwhite nextgroup=vimCmdSep,vimComment contains=vimAugroupKey
403Vim9 syn match vimAugroup "\<aug\%[roup]\>\ze\s*\%([#|]\|$\)" skipwhite nextgroup=vimCmdSep,vim9Comment contains=vimAugroupKey
404
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000405" Operators: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000406" =========
Doug Kearnsb9ffbf52025-04-27 19:17:06 +0200407syn cluster vimOperGroup contains=@vimContinue,@vimExprList,vim9Comment,vim9LineComment,vimContinueString
Doug Kearns1aa287e2025-02-10 22:00:27 +0100408syn match vimOper "\a\@<!!" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
409syn match vimOper "||\|&&\|[-+*/%.]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
Doug Kearnsc29b5332025-04-26 20:14:15 +0200410syn match vimOper "?" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString
Doug Kearnsc273f1a2025-01-20 21:53:01 +0100411" distinguish ternary : from ex-colon
Doug Kearnsc29b5332025-04-26 20:14:15 +0200412syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString
413syn match vimOper "??" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString
414syn match vimOper "=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile
415syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile
416syn match vimOper "\<is\%(not\)\=\>" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile
417syn match vimOper "\<is\%(not\)\=[?#]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile
Doug Kearns1aa287e2025-02-10 22:00:27 +0100418syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup nextgroup=vimSubscript
419syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimSubscript,vimVar
420syn region vimOperParen contained matchgroup=vimSep start="\[" end="]" contains=@vimOperGroup nextgroup=vimSubscript,vimVar
Bram Moolenaar6be7f872012-01-20 21:08:56 +0100421if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
Bram Moolenaar5c736222010-01-06 20:54:52 +0100422 syn match vimOperError ")"
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000423endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424
Doug Kearnsc29b5332025-04-26 20:14:15 +0200425syn match vimOperContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList contains=vimWhitespace
426syn match vimOperContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList contains=vimWhitespace
Doug Kearns1aa287e2025-02-10 22:00:27 +0100427syn cluster vimOperContinue contains=vimOperContinue,vimOperContinueComment
428
429" Lambda Expressions: {{{2
430" ==================
431syn match vimLambdaOperator contained "->" skipwhite nextgroup=@vimExprList
Doug Kearns722fbd12025-03-28 19:36:37 +0100432syn region vimLambda contained
433 \ matchgroup=vimLambdaBrace
434 \ start=+{\ze[[:space:][:alnum:]_.,]*\%(\n\s*\%(\\[[:space:][:alnum:]_.,]*\|"\\ .*\)\)*->+
435 \ skip=+\n\s*\%(\\\|"\\ \)+
436 \ end="}" end="$"
437 \ contains=@vimContinue,@vimExprList,vimLambdaParams
438syn match vimLambdaParams contained "\%({\n\=\)\@1<=\_.\{-}\%(->\)\@=" nextgroup=vimLambdaOperator contains=@vimContinue,vimFuncParam
Doug Kearns1aa287e2025-02-10 22:00:27 +0100439
Doug Kearns722fbd12025-03-28 19:36:37 +0100440syn match vim9LambdaOperator contained "=>" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment
441syn match vim9LambdaParen contained "[()]"
442syn match vim9LambdaParams contained
443 \ "(\%(\<func(\|[^(]\)*\%(\n\s*\\\%(\<func(\|[^(]\)*\|\n\s*#\\ .*\)*\ze\s\+=>"
444 \ skipwhite nextgroup=vim9LambdaOperator
445 \ contains=@vim9Continue,vimDefParam,vim9LambdaParen,vim9LambdaReturnType
446syn region vim9LambdaReturnType contained start=")\@<=:\s" end="\ze\s*#" end="\ze\s*=>" contains=@vim9Continue,@vimType transparent
447syn region vim9LambdaBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
Doug Kearns1aa287e2025-02-10 22:00:27 +0100448
449syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment
450
dkearns4ba70ca2024-04-15 04:32:56 +1000451" Functions: Tag is provided for those who wish to highlight tagged functions {{{2
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000452" =========
Doug Kearns1aa287e2025-02-10 22:00:27 +0100453syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncScope,vimFuncSID,Tag
454syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncScope,vimFuncSID,Tag
dkearns4ba70ca2024-04-15 04:32:56 +1000455
Doug Kearnsa577e422025-05-17 16:29:13 +0200456syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHeredoc,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
Doug Kearns1aa287e2025-02-10 22:00:27 +0100457syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimInsert,vimConst,vimLet,vimSearch
458syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Block,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9LhsVariable,vim9LhsVariableList,vim9LhsRegister,vim9Search,@vimSpecialVar
dkearns35e6f4c2024-03-22 06:41:10 +1100459
460syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
461syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
462syn match vimDef "\<def\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimDefKey
463
464syn match vimFunction "\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimFuncList skipwhite nextgroup=vimFuncParams
Doug Kearns818c6412024-10-06 17:00:48 +0200465syn match vimDef "\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams
dkearns35e6f4c2024-03-22 06:41:10 +1100466
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100467syn region vimFuncComment contained
468 \ start=+".*+
469 \ skip=+\n\s*\\\|\n\s*"\\ +
470 \ end="$"
471 \ skipwhite skipempty nextgroup=vimFuncBody,vimEndfunction
472syn region vimDefComment contained
473 \ start="#.*"
474 \ skip=+\n\s*\\\|\n\s*#\\ +
475 \ end="$"
476 \ skipwhite skipempty nextgroup=vimDefBody,vimEnddef
dkearns35e6f4c2024-03-22 06:41:10 +1100477
478syn match vimFuncBang contained "!"
479syn match vimFuncSID contained "\c<sid>"
Doug Kearns1aa287e2025-02-10 22:00:27 +0100480syn match vimFuncScope contained "\<[sg]:"
dkearns35e6f4c2024-03-22 06:41:10 +1100481syn keyword vimFuncKey contained fu[nction]
482syn keyword vimDefKey contained def
483
Doug Kearns9b67a2e2024-12-26 10:13:45 +0100484syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,vimOperParen,@vimContinue
485syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals,vimOperParen
dkearns35e6f4c2024-03-22 06:41:10 +1100486syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals
487syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals
488
Doug Kearns35699f12024-09-19 19:51:59 +0200489syn match vimFuncParamEquals contained "=" skipwhite nextgroup=@vimExprList
490syn match vimFuncMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError
dkearns35e6f4c2024-03-22 06:41:10 +1100491
Doug Kearns35699f12024-09-19 19:51:59 +0200492syn region vimFuncBody contained start="^." matchgroup=vimCmdSep start="|" matchgroup=vimCommand end="\<endfu\%[nction]\>" contains=@vimFuncBodyList skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError
493syn region vimDefBody contained start="^." matchgroup=vimCmdSep start="|" matchgroup=vimCommand end="\<enddef\>" contains=@vimDefBodyList skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError
dkearns35e6f4c2024-03-22 06:41:10 +1100494
Doug Kearnsfc64ac02024-06-22 11:20:36 +0200495syn match vimEndfunction "\<endf\%[unction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError
496syn match vimEnddef "\<enddef\>" skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000497
Bram Moolenaarf3913272016-02-25 00:00:01 +0100498if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
Doug Kearns818c6412024-10-06 17:00:48 +0200499 syn region vimFuncFold start="\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\<endf\%[unction]\>" contains=vimFunction fold keepend extend transparent
500 syn region vimDefFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="\<enddef\>" contains=vimDef fold keepend extend transparent
Bram Moolenaarb4ff5182015-11-10 21:15:48 +0100501endif
dkearns35e6f4c2024-03-22 06:41:10 +1100502
dkearns35e6f4c2024-03-22 06:41:10 +1100503" Types: {{{2
504" =====
Doug Kearnsd65e58f2024-07-17 19:34:14 +0200505
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100506syn region vimReturnType contained
507 \ start=":\%(\s\|\n\)\@="
508 \ skip=+\n\s*\\\|\n\s*#\\ \|^\s*#\\ +
509 \ end="$"
510 \ matchgroup=vim9Comment
511 "\ allow for legacy script tail comment error
512 \ end="\ze[#"]"
513 \ skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimCommentError
514 \ contains=@vim9Continue,@vimType
515 \ transparent
Doug Kearnsd65e58f2024-07-17 19:34:14 +0200516syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType contains=vimTypeSep
dkearns35e6f4c2024-03-22 06:41:10 +1100517
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100518syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType
dkearns35e6f4c2024-03-22 06:41:10 +1100519syn keyword vimType contained any blob bool channel float job number string void
Doug Kearns722fbd12025-03-28 19:36:37 +0100520syn match vimType contained "\<\%(func\)\>"
521syn region vimCompoundType contained matchgroup=vimType start="\<func(" end=")" nextgroup=vimTypeSep contains=@vim9Continue,@vimType transparent
522syn region vimCompoundType contained matchgroup=vimType start="\<tuple<" end=">" contains=@vim9Continue,@vimType transparent
523syn region vimCompoundType contained matchgroup=vimType start="\<\%(list\|dict\)<" end=">" contains=@vimType oneline transparent
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100524syn match vimUserType contained "\<\%(\h\w*\.\)*\u\w*\>"
dkearns35e6f4c2024-03-22 06:41:10 +1100525
526syn cluster vimType contains=vimType,vimCompoundType,vimUserType
Bram Moolenaar4d8f4762021-06-27 15:18:56 +0200527
Doug Kearns818c6412024-10-06 17:00:48 +0200528" Classes, Enums And Interfaces: {{{2
529" =============================
530
531if s:vim9script
Doug Kearns1c580192025-05-01 17:43:17 +0200532
Doug Kearns818c6412024-10-06 17:00:48 +0200533 " Methods {{{3
Doug Kearns1aa287e2025-02-10 22:00:27 +0100534 syn match vim9MethodDef contained "\<def\>" skipwhite nextgroup=vim9MethodDefName,vim9ConstructorDefName
Doug Kearns818c6412024-10-06 17:00:48 +0200535 syn match vim9MethodDefName contained "\<\h\w*\>" nextgroup=vim9MethodDefParams contains=@vim9MethodName
536 syn region vim9MethodDefParams contained
537 \ matchgroup=Delimiter start="(" end=")"
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100538 \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError
Doug Kearns818c6412024-10-06 17:00:48 +0200539 \ contains=vimDefParam,vim9Comment,vimFuncParamEquals
Doug Kearns1aa287e2025-02-10 22:00:27 +0100540
Doug Kearnsadb703e2025-03-23 16:14:20 +0100541 syn match vim9ConstructorDefName contained "\<_\=new\w*\>"
Doug Kearns1aa287e2025-02-10 22:00:27 +0100542 \ nextgroup=vim9ConstructorDefParams
543 \ contains=@vim9MethodName
544 syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>"
545 \ skipwhite nextgroup=vimParamType,vimFuncParamEquals
546 \ contains=vim9This,vimOper
547 syn region vim9ConstructorDefParams contained
548 \ matchgroup=Delimiter start="(" end=")"
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100549 \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vimCommentError
Doug Kearns1aa287e2025-02-10 22:00:27 +0100550 \ contains=vim9ConstructorDefParam,vim9Comment,vimFuncParamEquals
551
Doug Kearns818c6412024-10-06 17:00:48 +0200552 syn region vim9MethodDefReturnType contained
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100553 \ start=":\%(\s\|\n\)\@="
554 \ skip=+\n\s*\\\|\n\s*#\\ \|^\s*#\\ +
555 \ end="$"
556 \ matchgroup=vim9Comment
557 \ end="\ze#"
558 \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vimCommentError
559 \ contains=@vim9Continue,vimType,vimTypeSep
Doug Kearns818c6412024-10-06 17:00:48 +0200560 \ transparent
Doug Kearnsdd3f1c02025-03-17 20:27:13 +0100561
562 syn region vim9MethodDefComment contained
563 \ start="#.*"
564 \ skip=+\n\s*\\\|\n\s*#\\ +
565 \ end="$"
566 \ skipwhite skipempty nextgroup=vim9MethodDefBody,vimEnddef
567
Doug Kearns818c6412024-10-06 17:00:48 +0200568 syn region vim9MethodDefBody contained
569 \ start="^.\=" matchgroup=vimCommand end="\<enddef\>"
570 \ skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError
571 \ contains=@vim9MethodDefBodyList
572
573 syn cluster vim9MethodDefBodyList contains=@vimDefBodyList,vim9This,vim9Super
574
575 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
576 syn match vim9MethodNameError contained "\<[a-z0-9]\i\>"
577 endif
Doug Kearnsadb703e2025-03-23 16:14:20 +0100578 syn match vim9MethodName contained "\<_\=new\w*\>"
Doug Kearns818c6412024-10-06 17:00:48 +0200579 syn keyword vim9MethodName contained empty len string
580
581 syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError
582
583 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
584 syn region vim9MethodDefFold contained start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
Doug Kearnsadb703e2025-03-23 16:14:20 +0100585 syn region vim9MethodDefFold contained start="^\s*:\=def\s\+_\=new\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
Doug Kearns818c6412024-10-06 17:00:48 +0200586 endif
587
588 syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold
589
590 " Classes {{{3
591 syn cluster vim9ClassBodyList contains=vim9Abstract,vim9Class,vim9Comment,vim9LineComment,@vim9Continue,@vimExprList,vim9Extends,vim9Implements,@vim9MethodDef,vim9Public,vim9Static,vim9Const,vim9Final,vim9This,vim9Super,vim9Var
592
593 syn match vim9Class contained "\<class\>" skipwhite nextgroup=vim9ClassName
594 syn match vim9ClassName contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Extends,vim9Implements
595 syn match vim9SuperClass contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Implements
596 syn match vim9ImplementedInterface contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9InterfaceListComma,vim9Extends
597 syn match vim9InterfaceListComma contained "," skipwhite skipnl nextgroup=vim9ImplementedInterface
598 syn keyword vim9Abstract abstract skipwhite skipnl nextgroup=vim9ClassBody,vim9AbstractDef
599 syn keyword vim9Extends contained extends skipwhite skipnl nextgroup=vim9SuperClass
600 syn keyword vim9Implements contained implements skipwhite skipnl nextgroup=vim9ImplementedInterface
601 syn keyword vim9Public contained public
602 syn keyword vim9Static contained static
Doug Kearns1aa287e2025-02-10 22:00:27 +0100603 " FIXME: don't match as dictionary keys, remove when operators are not
604 " shared between Vim9 and legacy script
605 syn match vim9This contained "\.\@1<!\<this\>:\@!"
606 " super must be folowed by '.'
607 syn match vim9Super contained "\.\@1<!\<super\.\@="
Doug Kearns818c6412024-10-06 17:00:48 +0200608
609 VimFoldc syn region vim9ClassBody start="\<class\>" matchgroup=vimCommand end="\<endclass\>" contains=@vim9ClassBodyList transparent
610
611 " Enums {{{3
Doug Kearns1c580192025-05-01 17:43:17 +0200612 syn cluster vim9EnumBodyList contains=vim9Comment,vim9LineComment,@vim9Continue,vim9Enum,@vimExprList,@vim9MethodDef,vim9Public,vim9Static,vim9Const,vim9Final,vim9This,vim9Var
Doug Kearns818c6412024-10-06 17:00:48 +0200613
Doug Kearns1c580192025-05-01 17:43:17 +0200614 syn match vim9Enum contained "\<enum\>" skipwhite nextgroup=vim9EnumName
615
616 syn match vim9EnumName contained "\<\u\w*\>" skipwhite skipempty nextgroup=vim9EnumNameTrailing,vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue,vim9EnumImplements
617 syn match vim9EnumNameTrailing contained "\S.*"
618 syn region vim9EnumNameComment contained
619 \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$"
620 \ skipwhite skipempty nextgroup=vim9EnumNameComment,vim9EnumValue
621 \ contains=@vimCommentGroup,vimCommentString
622 " vim9EnumName's "skipempty" should only apply to comments and enum values and not implements clauses
623 syn match vim9EnumNameEmpty contained "^" skipwhite skipempty nextgroup=vim9EnumNameComment,vim9EnumValue
624 " allow line continuation between enum name and "implements"
625 syn match vim9EnumNameContinue contained
626 \ "^\s*\\"
627 \ skipwhite skipnl nextgroup=vim9EnumNameTrailing,vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue,vim9EnumImplements
628 \ contains=vimWhitespace
629 syn match vim9EnumNameContinueComment contained
630 \ "^\s*#\\ .*"
631 \ skipwhite skipnl nextgroup=vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue
632 \ contains=vimWhitespace
633 syn cluster vim9EnumNameContinue contains=vim9EnumNameContinue,vim9EnumNameContinueComment
634
635 " enforce enum value list location
636 syn match vim9EnumValue contained "\<\a\w*\>" nextgroup=vim9EnumValueArgList,vim9EnumValueListComma,vim9Comment
637 syn match vim9EnumValueListComma contained "," skipwhite skipempty nextgroup=vim9EnumValue,vim9EnumValueListCommaComment
638 syn region vim9EnumValueListCommaComment contained
639 \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$"
640 \ skipwhite skipempty nextgroup=vim9EnumValueListCommaComment,vim9EnumValue
641 \ contains=@vimCommentGroup,vimCommentString
642 syn region vim9EnumValueArgList contained
643 \ matchgroup=vimParenSep start="(" end=")"
644 \ nextgroup=vim9EnumValueListComma
645 \ contains=@vimExprList,vimContinueString,vim9Comment
646
647 syn keyword vim9EnumImplements contained implements skipwhite nextgroup=vim9EnumImplementedInterface
648 syn match vim9EnumImplementedInterface contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9EnumInterfaceListComma,vim9EnumImplementedInterfaceComment,vim9EnumValue
649 syn match vim9EnumInterfaceListComma contained "," skipwhite nextgroup=vim9EnumImplementedInterface
650 syn region vim9EnumImplementedInterfaceComment contained
651 \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$"
652 \ skipwhite skipempty nextgroup=vim9EnumImplementedInterfaceComment,vim9EnumValue
653 \ contains=@vimCommentGroup,vimCommentString
Doug Kearns818c6412024-10-06 17:00:48 +0200654
655 VimFolde syn region vim9EnumBody start="\<enum\>" matchgroup=vimCommand end="\<endenum\>" contains=@vim9EnumBodyList transparent
656
657 " Interfaces {{{3
658 " TODO: limit to decl only - no init values
659 syn cluster vim9InterfaceBodyList contains=vim9Comment,vim9LineComment,@vim9Continue,vim9Extends,vim9Interface,vim9AbstractDef,vim9Var
660
661 syn match vim9Interface contained "\<interface\>" skipwhite nextgroup=vim9InterfaceName
662 syn match vim9InterfaceName contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Extends
663
664 syn keyword vim9AbstractDef contained def skipwhite nextgroup=vim9AbstractDefName
665 syn match vim9AbstractDefName contained "\<\h\w*\>" skipwhite nextgroup=vim9AbstractDefParams contains=@vim9MethodName
666 syn region vim9AbstractDefParams contained
667 \ matchgroup=Delimiter start="(" end=")"
668 \ skipwhite skipnl nextgroup=vimDefComment,vim9AbstractDefReturnType,vimCommentError
669 \ contains=vimDefParam,vim9Comment,vimFuncParamEquals
670 syn region vim9AbstractDefReturnType contained
671 \ start=":\s" end="$" matchgroup=vim9Comment end="\ze[#"]"
672 \ skipwhite skipnl nextgroup=vimDefComment,vimCommentError
673 \ contains=vimTypeSep
674 \ transparent
675
676 VimFoldi syn region vim9InterfaceBody start="\<interface\>" matchgroup=vimCommand end="\<endinterface\>" contains=@vim9InterfaceBodyList transparent
677
Doug Kearns1aa287e2025-02-10 22:00:27 +0100678 " Type Aliases {{{3
Doug Kearns818c6412024-10-06 17:00:48 +0200679 syn match vim9Type "\<ty\%[pe]\>" skipwhite nextgroup=vim9TypeAlias,vim9TypeAliasError
680 syn match vim9TypeAlias contained "\<\u\w*\>" skipwhite nextgroup=vim9TypeEquals
681 syn match vim9TypeEquals contained "=" skipwhite nextgroup=@vimType
682 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_notypealiaserror")
Doug Kearns1aa287e2025-02-10 22:00:27 +0100683 syn match vim9TypeAliasError contained "\<\l\w*\>" skipwhite nextgroup=vim9TypeEquals
Doug Kearns818c6412024-10-06 17:00:48 +0200684 endif
685endif
686
Doug Kearns1aa287e2025-02-10 22:00:27 +0100687" Blocks: {{{2
688" ======
689Vim9 syn region vim9Block matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
690
dkearns04e53632024-04-11 06:18:37 +1000691" Keymaps: {{{2
dkearns69866442023-11-22 05:43:40 +1100692" =======
693
dkearns04e53632024-04-11 06:18:37 +1000694syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,@vimKeymapLineComment
dkearns69866442023-11-22 05:43:40 +1100695syn match vimKeymapLhs "\S\+" contained skipwhite nextgroup=vimKeymapRhs contains=vimNotation
696syn match vimKeymapRhs "\S\+" contained skipwhite nextgroup=vimKeymapTailComment contains=vimNotation
697syn match vimKeymapTailComment "\S.*" contained
dkearns04e53632024-04-11 06:18:37 +1000698
699" TODO: remove when :" comment is matched in parts as "ex-colon comment" --djk
700if s:vim9script
701 syn match vim9KeymapLineComment "#.*" contained contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
702else
703 syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle
704endif
705syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment
dkearns69866442023-11-22 05:43:40 +1100706
Doug Kearns7866d542024-08-23 18:37:55 +0200707syn region vimLoadkeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$" contains=vimKeymapStart
dkearns69866442023-11-22 05:43:40 +1100708
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000709" Special Filenames, Modifiers, Extension Removal: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000710" ===============================================
dkearns2c51e152024-02-27 07:10:18 +1100711syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst1
712syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst1
713syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1
714syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst1
715syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1
716syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst1
Bram Moolenaar5c736222010-01-06 20:54:52 +0100717syn match vimSpecFileMod "\(:[phtre]\)\+" contained
Bram Moolenaar071d4272004-06-13 20:20:40 +0000718
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000719" User-Specified Commands: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000720" =======================
dkearns04e53632024-04-11 06:18:37 +1000721syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,@vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
Doug Kearns520a2c72025-04-08 20:50:00 +0200722
723syn match vimUserCmd "\<com\%[mand]\>!\=" skipwhite nextgroup=vimUserCmdAttrs,vimUserCmdName contains=vimBang
724syn match vimUserCmd +\<com\%[mand]\>!\=\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimUserCmdAttrs,vimUserCmdName contains=vimBang
725
726syn region vimUserCmdAttrs contained
727 \ start="-\l"
728 \ start=+^\s*\%(\\\|["#]\\ \)+
729 \ end="\ze\s\u"
730 \ skipwhite nextgroup=vimUserCmdName
731 \ contains=@vimContinue,vimUserCmdAttr,vimUserCmdAttrError
732 \ transparent
733syn match vimUserCmdAttrError contained "-\a\+\ze\%(\s\|=\)"
734syn match vimUserCmdAttr contained "-addr=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrAddr
735syn match vimUserCmdAttr contained "-bang\>" contains=vimUserCmdAttrKey
736syn match vimUserCmdAttr contained "-bar\>" contains=vimUserCmdAttrKey
737syn match vimUserCmdAttr contained "-buffer\>" contains=vimUserCmdAttrKey
738syn match vimUserCmdAttr contained "-complete=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrComplete,vimUserCmdError
739syn match vimUserCmdAttr contained "-count\>" contains=vimUserCmdAttrKey
740syn match vimUserCmdAttr contained "-count=" contains=vimUserCmdAttrKey nextgroup=vimNumber
741syn match vimUserCmdAttr contained "-keepscript\>" contains=vimUserCmdAttrKey
742syn match vimUserCmdAttr contained "-nargs=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrNargs
743syn match vimUserCmdAttr contained "-range\>" contains=vimUserCmdAttrKey
744syn match vimUserCmdAttr contained "-range=" contains=vimUserCmdAttrKey nextgroup=vimNumber,vimUserCmdAttrRange
745syn match vimUserCmdAttr contained "-register\>" contains=vimUserCmdAttrKey
Doug Kearns3c07eb02024-09-02 10:03:37 +0200746
747syn match vimUserCmdAttrNargs contained "[01*?+]"
748syn match vimUserCmdAttrRange contained "%"
749
Bram Moolenaar6be7f872012-01-20 21:08:56 +0100750if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
Bram Moolenaar5c736222010-01-06 20:54:52 +0100751 syn match vimUserCmdError contained "\S\+\>"
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000752endif
Bram Moolenaara93fa7e2006-04-17 22:14:47 +0000753
Doug Kearns3c07eb02024-09-02 10:03:37 +0200754syn case ignore
755syn keyword vimUserCmdAttrKey contained a[ddr] ban[g] bar bu[ffer] com[plete] cou[nt] k[eepscript] n[args] ra[nge] re[gister]
Doug Kearns520a2c72025-04-08 20:50:00 +0200756
757" GEN_SYN_VIM: vimUserCmdAttrComplete, START_STR='syn keyword vimUserCmdAttrComplete contained', END_STR=''
Doug Kearnsc29b5332025-04-26 20:14:15 +0200758syn keyword vimUserCmdAttrComplete contained arglist augroup behave breakpoint buffer color command compiler cscope diff_buffer dir dir_in_path environment event expression file file_in_path filetype filetypecmd function help highlight history keymap locale mapclear mapping menu messages option packadd runtime scriptnames shellcmd shellcmdline sign syntax syntime tag tag_listfiles user var
Doug Kearns520a2c72025-04-08 20:50:00 +0200759syn keyword vimUserCmdAttrComplete contained arglist augroup behave breakpoint buffer color command compiler cscope diff_buffer dir dir_in_path environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages option packadd runtime scriptnames shellcmd shellcmdline sign syntax syntime tag tag_listfiles user var
760syn keyword vimUserCmdAttrComplete contained custom customlist nextgroup=vimUserCmdAttrCompleteFunc,vimUserCmdError
761syn match vimUserCmdAttrCompleteFunc contained ",\%([bwglstav]:\|<[sS][iI][dD]>\)\=\h\w*\%([.#]\h\w*\)*"hs=s+1 nextgroup=vimUserCmdError contains=vimVarScope,vimFuncSID
762
Doug Kearns3c07eb02024-09-02 10:03:37 +0200763" GEN_SYN_VIM: vimUserCmdAttrAddr, START_STR='syn keyword vimUserCmdAttrAddr contained', END_STR=''
764syn keyword vimUserCmdAttrAddr contained arguments arg buffers buf lines line loaded_buffers load other quickfix qf tabs tab windows win
Doug Kearns520a2c72025-04-08 20:50:00 +0200765syn keyword vimUserCmdAttrAddr contained arguments arg buffers buf lines line loaded_buffers load other quickfix qf tabs tab windows win
766syn match vimUserCmdAttrAddr contained "?"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000767syn case match
Bram Moolenaar071d4272004-06-13 20:20:40 +0000768
Doug Kearns520a2c72025-04-08 20:50:00 +0200769syn match vimUserCmdName contained "\<\u[[:alnum:]]*\>" skipwhite nextgroup=vimUserCmdBlock,vimUserCmdReplacement
770syn match vimUserCmdName contained +\<\u[[:alnum:]]*\>\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimUserCmdBlock,vimUserCmdReplacement
771syn region vimUserCmdReplacement contained
772 \ start="\S"
773 \ start=+^\s*\%(\\\|["#]\\ \)+
774 \ skip=+\n\s*\%(\\\|["#]\\ \)+
775 \ end="$"
776 \ contains=@vimContinue,@vimUserCmdList,vimComFilter
777syn region vimUserCmdBlock contained
778 \ matchgroup=vimSep
779 \ start="{"
780 \ end="^\s*\zs}"
781 \ contains=@vimDefBodyList
dkearns04e53632024-04-11 06:18:37 +1000782
Doug Kearns520a2c72025-04-08 20:50:00 +0200783syn match vimDelcommand "\<delc\%[ommand]\>" skipwhite nextgroup=vimDelcommandAttr,vimDelcommandName
784syn match vimDelcommandAttr contained "-buffer\>" skipwhite nextgroup=vimDelcommandName
785syn match vimDelcommandName contained "\<\u[[:alnum:]]*\>"
Doug Kearns3c07eb02024-09-02 10:03:37 +0200786
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000787" Lower Priority Comments: after some vim commands... {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000788" =======================
dkearns959c3c82024-06-12 04:18:08 +1000789if get(g:, "vimsyn_comment_strings", 1)
Doug Kearns35699f12024-09-19 19:51:59 +0200790 syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' extend
dkearns959c3c82024-06-12 04:18:08 +1000791endif
dkearns04e53632024-04-11 06:18:37 +1000792
793if s:vim9script
dkearns04e53632024-04-11 06:18:37 +1000794 syn cluster vimComment contains=vim9Comment
795else
dkearns04e53632024-04-11 06:18:37 +1000796 syn cluster vimComment contains=vimComment
797endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000798
Doug Kearnsc29b5332025-04-26 20:14:15 +0200799VimL syn region vimComment
800 \ excludenl
801 \ start=+"+
802 \ skip=+\n\s*\%(\\\|"\\ \)+
803 \ end="$"
804 \ contains=@vimCommentGroup,vimCommentString
805 \ extend
806Vim9 syn region vim9Comment
807 \ excludenl
808 \ start="\%#=1\s\@1<=#\%({\@!\|{{\)"
809 \ skip="\n\s*\%(\\\|#\\ \)"
810 \ end="$"
811 \ contains=@vimCommentGroup,vimCommentString
812 \ extend
Doug Kearnsd65e58f2024-07-17 19:34:14 +0200813
Doug Kearnsfc64ac02024-06-22 11:20:36 +0200814syn match vim9CommentError contained "#.*"
815syn match vimCommentError contained +".*+
816
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000817" Environment Variables: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000818" =====================
Bram Moolenaar5c736222010-01-06 20:54:52 +0100819syn match vimEnvvar "\$\I\i*"
820syn match vimEnvvar "\${\I\i*}"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000821
Doug Kearns68ba6c22025-02-16 16:40:12 +0100822" Strings {{{2
823" =======
824
825" In-String Specials:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000826" Try to catch strings, if nothing else matches (therefore it must precede the others!)
827" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
Doug Kearnsc29b5332025-04-26 20:14:15 +0200828" syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
Bram Moolenaar5c736222010-01-06 20:54:52 +0100829syn match vimPatSepErr contained "\\)"
830syn match vimPatSep contained "\\|"
Bram Moolenaarb730f0c2018-11-25 03:56:26 +0100831syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\\]['"]" contains=@vimStringGroup
Bram Moolenaar5c736222010-01-06 20:54:52 +0100832syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
833syn match vimNotPatSep contained "\\\\"
Bram Moolenaar6ba83ba2022-06-12 22:15:57 +0100834syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
Doug Kearns1aa287e2025-02-10 22:00:27 +0100835syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
836syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
Bram Moolenaaracc22402020-06-07 21:07:18 +0200837"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
Doug Kearns695522d2025-01-10 20:02:17 +0100838
Bram Moolenaar6ba83ba2022-06-12 22:15:57 +0100839syn match vimEscape contained "\\."
dkearnse3e39342024-02-02 07:44:26 +1100840" syn match vimEscape contained +\\[befnrt\"]+
841syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}"
842syn match vimEscape contained "\\<" contains=vimNotation
843syn match vimEscape contained "\\<\*[^>]*>\=>"
Doug Kearns695522d2025-01-10 20:02:17 +0100844syn match vimQuoteEscape contained "''"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000845
Doug Kearnsc29b5332025-04-26 20:14:15 +0200846syn region vimString oneline matchgroup=vimString start=+$'+ end=+'+ nextgroup=vimSubscript contains=@vimStringInterpolation,vimQuoteEscape extend
847syn region vimString oneline matchgroup=vimString start=+$"+ end=+"+ nextgroup=vimSubscript contains=@vimStringInterpolation,@vimStringGroup extend
dkearnsb1427b42024-02-28 05:59:30 +1100848syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList
849syn match vimStringInterpolationBrace contained "{{"
850syn match vimStringInterpolationBrace contained "}}"
Doug Kearnsd164f2a2024-08-16 21:07:15 +0200851syn cluster vimStringInterpolation contains=vimStringInterpolationExpr,vimStringInterpolationBrace
thincacf8695d2024-01-28 18:57:23 +0100852
Doug Kearnsc29b5332025-04-26 20:14:15 +0200853syn region vimContinueString contained matchgroup=vimContinueString start=+"+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+"+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,@vimStringGroup
854syn region vimContinueString contained matchgroup=vimContinueString start=+'+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+'+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,vimQuoteEscape
855syn region vimContinueString contained matchgroup=vimContinueString start=+$"+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+"+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,@vimStringInterpolation,@vimStringGroup
856syn region vimContinueString contained matchgroup=vimContinueString start=+$'+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+'+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,@vimStringInterpolation,vimQuoteEscape
857
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000858" Substitutions: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000859" =============
Bram Moolenaar5c736222010-01-06 20:54:52 +0100860syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation
861syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
862syn cluster vimSubstList add=vimCollection
Doug Kearns92f4e912024-06-05 19:45:43 +0200863syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat
864syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat
865syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat
866syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat
dkearns2c51e152024-02-27 07:10:18 +1100867" TODO: Vim9 illegal separators for abbreviated :s form are [-.:], :su\%[...] required
868" : # is allowed but "not recommended" (see :h pattern-delimiter)
869syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline
870syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
871syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass
872syn match vimCollClassErr contained "\[:.\{-\}:\]"
873syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]"
874syn match vimSubstSubstr contained "\\z\=\d"
875syn match vimSubstTwoBS contained "\\\\"
876syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
877syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000878
Doug Kearns92f4e912024-06-05 19:45:43 +0200879" Vi compatibility
880syn match vimSubstDelim contained "\\"
881syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4
882
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000883" Marks, Registers, Addresses, Filters: {{{2
dkearns2c51e152024-02-27 07:10:18 +1100884syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
Doug Kearnsd8176092024-08-31 16:57:32 +0200885syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
886syn match vimMark ",\zs'[[\]{}()<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1
dkearns2c51e152024-02-27 07:10:18 +1100887syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
888syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
889syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst1
Bram Moolenaar5c736222010-01-06 20:54:52 +0100890syn match vimPlainMark contained "'[a-zA-Z0-9]"
Bram Moolenaar6c1e1572019-06-22 02:13:00 +0200891syn match vimRange "[`'][a-zA-Z0-9],[`'][a-zA-Z0-9]" contains=vimMark skipwhite nextgroup=vimFilter
Bram Moolenaar071d4272004-06-13 20:20:40 +0000892
Bram Moolenaarb4ff5182015-11-10 21:15:48 +0100893syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
Bram Moolenaar5c736222010-01-06 20:54:52 +0100894syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
895syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
896syn match vimRegister '@"'
897syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]'
Doug Kearnsa9c06422025-02-12 20:44:17 +0100898syn match vimLetRegister contained '@["0-9\-a-zA-Z:.%#=*+~_/]'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000899
Bram Moolenaar5c736222010-01-06 20:54:52 +0100900syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
901syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000902
Bram Moolenaar6c1e1572019-06-22 02:13:00 +0200903syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
Bram Moolenaard58a3bf2020-09-28 21:48:16 +0200904syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
905syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +0100907" Complex Repeats: (:h complex-repeat) {{{2
908" ===============
Bram Moolenaar6be7f872012-01-20 21:08:56 +0100909syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
910syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000911
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000912" Set command and associated set-options (vimOptions) with comment {{{2
Doug Kearns6bdfeb02025-03-07 18:49:11 +0100913syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetArgs
Doug Kearns2a6be832025-04-03 21:39:24 +0200914syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend
915syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
916syn match vimSetEscape contained "\\\%(\\[|"]\|.\)"
917syn match vimSetBarEscape contained "\\|"
918syn match vimSetQuoteEscape contained +\\"+
919syn region vimSetArgs contained
920 \ start="\S"
921 \ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ +
922 \ end=+\ze\\\@1<![|"]+
923 "\ assume this isn't an escaped char with backslash on the previous line
924 \ end=+^\s*\\\ze[|"]+
925 \ end="\ze\s#"
926 \ end="$"
927 \ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment
928 \ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
929 \ keepend
930syn region vimSetEqual contained
931 \ matchgroup=vimOper
932 \ start="[=:]\|[-+^]="
933 \ skip=+\\\s\|^\s*\%(\\\|["#]\\ \)+
934 \ end="\ze\s"
935 \ contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep,vimSetEscape,vimSetBarEscape,vimSetQuoteEscape
Doug Kearnsddbb6fe2024-07-24 20:21:22 +0200936syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap
937syn keyword vimSetAll contained all nextgroup=vimSetMod
938syn keyword vimSetTermcap contained termcap
Bram Moolenaar4072ba52020-12-23 13:56:35 +0100939syn match vimSetSep contained "[,:]"
Doug Kearnsddbb6fe2024-07-24 20:21:22 +0200940syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000941
Doug Kearnsd65e58f2024-07-17 19:34:14 +0200942" Variable Declarations: {{{2
943" =====================
Doug Kearns1aa287e2025-02-10 22:00:27 +0100944VimL syn keyword vimLet let skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList
945VimL syn keyword vimConst cons[t] skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList
946syn region vimVarList contained
947 \ start="\[" end="]"
948 \ contains=@vimContinue,@vimSpecialVar,vimVar
dkearnsf6869212023-12-11 01:53:24 +1100949
Doug Kearns1aa287e2025-02-10 22:00:27 +0100950VimL syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars
951syn match vimUnletBang contained "\a\@1<=!" skipwhite nextgroup=vimUnletVars
952syn region vimUnletVars contained
953 \ start="$\I\|\h" skip=+\n\s*\\\|\n\s*"\\ \|^\s*"\\ + end="$" end="\ze[|"]"
954 \ nextgroup=vimCmdSep,vimComment
Doug Kearns3dca5122025-03-09 16:30:28 +0100955 \ contains=@vimContinue,vimEnvvar,vimVar,vimVimVar
dkearnsf6869212023-12-11 01:53:24 +1100956
Doug Kearnsa577e422025-05-17 16:29:13 +0200957VimFoldh syn region vimLetHeredoc matchgroup=vimLetHeredocStart start='\%(^\z(\s*\)\S.*\)\@<==<<\s*trim\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHeredocStop end='^\z1\=\z2$' extend
958VimFoldh syn region vimLetHeredoc matchgroup=vimLetHeredocStart start='=<<\%(\s*\)\@>\z(\L\S*\)' matchgroup=vimLetHeredocStop end='^\z1$' extend
959VimFoldh syn region vimLetHeredoc matchgroup=vimLetHeredocStart start='\%(^\z(\s*\)\S.*\)\@<==<<\s*\%(trim\s\+eval\|eval\s\+trim\)\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHeredocStop end='^\z1\=\z2$' contains=@vimStringInterpolation extend
960VimFoldh syn region vimLetHeredoc matchgroup=vimLetHeredocStart start='=<<\s*eval\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHeredocStop end='^\z1$' contains=@vimStringInterpolation extend
Doug Kearnsd65e58f2024-07-17 19:34:14 +0200961
962Vim9 syn keyword vim9Const const skipwhite nextgroup=vim9Variable,vim9VariableList
963Vim9 syn keyword vim9Final final skipwhite nextgroup=vim9Variable,vim9VariableList
964Vim9 syn keyword vim9Var var skipwhite nextgroup=vim9Variable,vim9VariableList
965
Doug Kearnsa577e422025-05-17 16:29:13 +0200966syn match vim9Variable contained "\<\h\w*\>" skipwhite nextgroup=vimTypeSep,vimLetHeredoc,vimOper
Doug Kearns1aa287e2025-02-10 22:00:27 +0100967syn region vim9VariableList contained start="\[" end="]" contains=@vimContinue,@vimSpecialVar,vim9Variable
968
969" Lockvar and Unlockvar: {{{2
970" =====================
971syn keyword vimLockvar lockv[ar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars
972syn keyword vimUnlockvar unlo[ckvar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars
973syn match vimLockvarBang contained "\a\@1<=!" skipwhite nextgroup=vimLockvarVars
974syn match vimLockvarDepth contained "\<[0-3]\>" skipwhite nextgroup=vimLockvarVars
975syn region vimLockvarVars contained
976 \ start="\h" skip=+\n\s*\\\|\n\s*"\\ \|^\s*"\\ + end="$" end="\ze[|"]"
977 \ nextgroup=vimCmdSep,vimComment
978 \ contains=@vimContinue,vimVar
979
980hi def link vimLockvar vimCommand
981hi def link vimUnlockvar vimCommand
982hi def link vimLockvarBang vimBang
983hi def link vimLockvarDepth vimNumber
Bram Moolenaar071d4272004-06-13 20:20:40 +0000984
dkearnsf6869212023-12-11 01:53:24 +1100985" For: {{{2
986" ===
Doug Kearns1aa287e2025-02-10 22:00:27 +0100987" handles Vim9 and legacy for now
988syn region vimFor
989 \ matchgroup=vimCommand
990 \ start="\<for\>" end="\<in\>"
991 \ skipwhite skipnl nextgroup=@vimForInContinue,vim9ForInComment,@vimExprList
992 \ contains=@vimContinue,vimVar,vimVarList,vim9VariableList
993 \ transparent
994
995syn match vim9ForInComment contained "#.*" skipwhite skipempty nextgroup=vimForInComment,@vimExprList
996
997syn match vimForInContinue contained "^\s*\zs\\" skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList
998syn match vimForInContinueComment contained '^\s*\zs["#]\\ .*' skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList
999syn cluster vimForInContinue contains=vimForInContinue,vimForInContinueComment
dkearns76d62982024-03-23 05:55:25 +11001000
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001001" Abbreviations: {{{2
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001002" =============
h-east9b53c052024-02-13 21:09:22 +01001003" GEN_SYN_VIM: vimCommand abbrev, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
dkearns16249702024-02-23 05:45:05 +11001004syn keyword vimAbb ab[breviate] ca[bbrev] cnorea[bbrev] cuna[bbrev] ia[bbrev] inorea[bbrev] iuna[bbrev] norea[bbrev] una[bbreviate] skipwhite nextgroup=vimMapMod,vimMapLhs
dkearns982e1912024-03-28 20:06:03 +11001005" GEN_SYN_VIM: vimCommand abclear, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod'
1006syn keyword vimAbb abc[lear] cabc[lear] iabc[lear] skipwhite nextgroup=vimMapMod
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001007
Doug Kearnsfa3b1042025-04-22 19:48:13 +02001008" Filename Patterns: {{{2
1009" =================
1010
1011syn match vimWildcardQuestion contained "?"
1012syn match vimWildcardStar contained "*"
1013
1014syn match vimWildcardBraceComma contained ","
1015syn region vimWildcardBrace contained
1016 \ matchgroup=vimWildcard
1017 \ start="{"
1018 \ end="}"
1019 \ contains=vimWildcardEscape,vimWildcardBrace,vimWildcardBraceComma,vimWildcardQuestion,vimWildcardStar,vimWildcardBracket
1020 \ oneline
1021
1022syn match vimWildcardIntervalNumber contained "\d\+"
1023syn match vimWildcardInterval contained "\\\\\\{\d\+\%(,\d\+\)\=\\}" contains=vimWildcardIntervalNumber
1024
1025
1026syn match vimWildcardBracket contained "\[\%(\^\=]\=\%(\\.\|\[\([:.=]\)[^:.=]\+\1]\|[^][:space:]]\)*\)\@>]"
1027 \ contains=vimWildcardBracketStart,vimWildcardEscape
1028
1029syn match vimWildcardBracketCharacter contained "." nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketHyphen,vimWildcardBracketEnd
1030syn match vimWildcardBracketRightBracket contained "]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd
1031syn match vimWildcardBracketHyphen contained "-]\@!" nextgroup=@vimWildcardBracketCharacter
1032syn match vimWildcardBracketEscape contained "\\." nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketHyphen,vimWildcardBracketEnd
1033syn match vimWildcardBracketCharacterClass contained "\[:[^:]\+:]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd
1034syn match vimWildcardBracketEquivalenceClass contained "\[=[^=]\+=]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd
1035syn match vimWildcardBracketCollatingSymbol contained "\[\.[^.]\+\.]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd
1036
1037syn match vimWildcardBracketStart contained "\[" nextgroup=vimWildcardBracketCaret,vimWildcardBracketRightBracket,@vimWildcardBracketCharacter
1038syn match vimWildcardBracketCaret contained "\^" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketRightBracket
1039syn match vimWildcardBracketEnd contained "]"
1040
1041syn cluster vimWildcardBracketCharacter contains=vimWildcardBracketCharacter,vimWildcardBracketEscape,vimWildcardBracketCharacterClass,vimWildcardBracketEquivalenceClass,vimWildcardBracketCollatingSymbol
1042
1043syn match vimWildcardEscape contained "\\."
1044
1045syn cluster vimWildcard contains=vimWildcardQuestion,vimWildcardStar,vimWildcardBrace,vimWildcardBracket,vimWildcardInterval
1046
1047" Autocmd and Doauto{cmd,all}: {{{2
1048" ===========================
1049
1050" TODO: explicitly match the {cmd} arg rather than bailing out to TOP
1051syn region vimAutocmdBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
1052
1053syn match vimAutocmdGroup contained "\%(\\["|[:space:]]\|[^"|[:space:]]\)\+" skipwhite nextgroup=vimAutoEvent,vimAutoEventGlob
1054syn match vimAutocmdBang contained "\a\@1<=!" skipwhite nextgroup=vimAutocmdGroup,vimAutoEvent,vimAutoEventGlob
1055
1056" TODO: cleaner handling of | in pattern position
1057" : match pattern items in addition to wildcards
1058syn region vimAutocmdPattern contained
1059 \ start="|\@!\S"
1060 \ skip="\\\\\|\\[,[:space:]]"
1061 \ end="\ze[,[:space:]]"
1062 \ end="$"
1063 \ skipwhite nextgroup=vimAutocmdPatternSep,vimAutocmdMod,vimAutocmdBlock
1064 \ contains=vimEnvvar,@vimWildcard,vimAutocmdPatternEscape
1065syn match vimAutocmdBufferPattern contained "<buffer\%(=\%(\d\+\|abuf\)\)\=>" skipwhite nextgroup=vimAutocmdPatternSep,vimAutocmdMod,vimAutocmdBlock
1066" trailing pattern separator comma allowed
1067syn match vimAutocmdPatternSep contained "," skipwhite nextgroup=@vimAutocmdPattern,vimAutocmdMod,vimAutocmdBlock
1068syn match vimAutocmdPatternEscape contained "\\."
1069syn cluster vimAutocmdPattern contains=vimAutocmdPattern,vimAutocmdBufferPattern
1070
1071" TODO: Vim9 requires '++' prefix
1072syn match vimAutocmdMod contained "\%(++\)\=\<nested\>" skipwhite nextgroup=vimAutocmdMod,vimAutocmdBlock
1073syn match vimAutocmdMod contained "++once\>" skipwhite nextgroup=vimAutocmdMod,vimAutocmdBlock
1074
1075" higher priority than vimAutocmdGroup, assume no group is so named
1076syn match vimAutoEventGlob contained "*" skipwhite nextgroup=@vimAutocmdPattern
1077syn match vimAutoEventSep contained "\a\@1<=," nextgroup=vimAutoEvent
1078
1079syn match vimAutocmd "\<au\%[tocmd]\>" skipwhite nextgroup=vimAutocmdBang,vimAutocmdGroup,vimAutoEvent,vimAutoEventGlob
1080
1081
1082syn match vimDoautocmdMod contained "<nomodeline>" skipwhite nextgroup=vimAutocmdGroup,vimAutoEvent
1083syn match vimDoautocmd "\<do\%[autocmd]\>" skipwhite nextgroup=vimDoautocmdMod,vimAutocmdGroup,vimAutoEvent
1084syn match vimDoautocmd "\<doautoa\%[ll]\>" skipwhite nextgroup=vimDoautocmdMod,vimAutocmdGroup,vimAutoEvent
Bram Moolenaar071d4272004-06-13 20:20:40 +00001085
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001086" Echo And Execute: -- prefer strings! {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001087" ================
dkearns61887b32024-03-15 23:45:48 +11001088" NOTE: No trailing comments
dkearnsb1427b42024-02-28 05:59:30 +11001089
dkearns61887b32024-03-15 23:45:48 +11001090syn region vimEcho
1091 \ matchgroup=vimCommand
1092 \ start="\<ec\%[ho]\>"
1093 \ start="\<echoe\%[rr]\>"
1094 \ start="\<echom\%[sg]\>"
1095 \ start="\<echoc\%[onsole]\>"
1096 \ start="\<echon\>"
1097 \ start="\<echow\%[indow]\>"
1098 \ skip=+\\|\|\n\s*\\\|\n\s*"\\ +
1099 \ matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
1100
1101syn match vimEchohl "\<echohl\=\>" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102syn case ignore
dkearns61887b32024-03-15 23:45:48 +11001103syn keyword vimEchohlNone contained none
Bram Moolenaar071d4272004-06-13 20:20:40 +00001104syn case match
1105
dkearns35e6f4c2024-03-22 06:41:10 +11001106syn cluster vimEcho contains=vimEcho,vimEchohl
dkearns61887b32024-03-15 23:45:48 +11001107
1108syn region vimExecute matchgroup=vimCommand start="\<exe\%[cute]\>" skip=+\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
dkearnsb1427b42024-02-28 05:59:30 +11001109
Doug Kearns9b171bd2025-04-10 19:59:22 +02001110" Filter: {{{2
1111" ======
1112syn match vimExFilter "\<filt\%[er]\>" skipwhite nextgroup=vimExFilterBang,vimExFilterPattern
1113syn match vimExFilterBang contained "\a\@1<=!" skipwhite nextgroup=vimExFilterPattern
1114syn region vimExFilterPattern contained
1115 \ start="[[:ident:]]"
1116 \ end="\ze[[:space:]\n]"
1117 \ skipwhite nextgroup=@vimCmdList
1118 \ contains=@vimSubstList
1119 \ oneline
1120syn region vimExFilterPattern contained
1121 \ matchgroup=Delimiter
1122 \ start="\z([^[:space:][:ident:]|"]\)"
1123 \ skip="\\\\\|\\\z1"
1124 \ end="\z1"
1125 \ skipwhite nextgroup=@vimCmdList
1126 \ contains=@vimSubstList
1127 \ oneline
1128
1129" Grep and Make: {{{2
1130" =============
1131" | is the command separator, escaped with \| all other backslashes are passed through literally, no tail comments
1132syn match vimGrep "\<l\=gr\%[ep]\>" skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep
1133syn match vimGrepadd "\<l\=grepa\%[dd]\>" skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep
1134syn region vimGrepArgs contained
1135 \ start="|\@!\S"
1136 \ skip=+\n\s*\%(\\\|[#"]\\ \)+
1137 \ matchgroup=vimCmdSep
1138 \ end="|"
1139 \ end="$"
1140 "\ TODO: include vimSpecFile
1141 \ contains=vimGrepBarEscape
1142syn match vimGrepBarEscape contained "\\|"
1143syn match vimGrepBang contained "\a\@1<=!" skipwhite nextgroup=vimGrepArgs,vimCmdSep
1144
1145syn match vimMake "\<l\=make\=\>" skipwhite nextgroup=vimMakeBang,vimMakeArgs,vimCmdSep
1146syn region vimMakeArgs contained
1147 \ start="|\@!\S"
1148 \ skip=+\n\s*\%(\\\|[#"]\\ \)+
1149 \ matchgroup=vimCmdSep
1150 \ end="|"
1151 \ end="$"
1152 "\ TODO: include vimSpecFile
1153 \ contains=vimMakeBarEscape
1154syn match vimMakeBarEscape contained "\\|"
1155syn match vimMakeBang contained "\a\@1<=!" skipwhite nextgroup=vimMakeArgs,vimCmdSep
1156
1157syn match vimHelpgrep "\<l\=helpg\%[rep]\>" skipwhite nextgroup=vimHelpgrepBang,vimHelpgrepPattern
1158syn region vimHelpgrepPattern contained
1159 \ start="\S"
1160 \ matchgroup=Special
1161 \ end="@\w\w\>"
1162 \ end="$"
1163 \ contains=@vimSubstList
1164 \ oneline
1165
1166" Vimgrep: {{{2
1167" =======
1168syn match vimVimgrep "\<l\=vim\%[grep]\>" skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern
1169syn match vimVimgrepadd "\<l\=vimgrepa\%[dd]\>" skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern
1170syn match vimVimgrepBang contained "\a\@1<=!" skipwhite nextgroup=vimVimgrepPattern
1171syn region vimVimgrepPattern contained
1172 \ start="[[:ident:]]"
1173 \ end="\ze[[:space:]\n]"
1174 \ skipwhite nextgroup=vimVimgrepFile,vimCmdSep
1175 \ contains=@vimSubstList
1176 \ oneline
1177syn region vimVimgrepPattern contained
1178 \ matchgroup=Delimiter
1179 \ start="\z([^[:space:][:ident:]|"]\)"
1180 \ skip="\\\\\|\\\z1"
1181 \ end="\z1"
1182 \ skipwhite nextgroup=vimVimgrepFlags,vimVimgrepFile,vimCmdSep
1183 \ contains=@vimSubstList
1184 \ oneline
1185syn match vimVimgrepEscape contained "\\\%(\\|\|.\)"
1186syn match vimVimgrepBarEscape contained "\\|"
1187syn region vimVimgrepFile contained
1188 \ start="|\@!\S"
1189 \ matchgroup=vimCmdSep
1190 \ end="|"
1191 \ end="\ze\s"
1192 \ end="$"
1193 \ skipwhite nextgroup=vimVimgrepFile
1194 \ contains=vimSpecFile,vimVimgrepEscape,vimVimgrepBarEscape
1195syn match vimVimgrepFlags contained "\<[gjf]\{,3\}\>" skipwhite nextgroup=vimVimgrepfile
1196
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001197" Maps: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001198" ====
Doug Kearns99984fc2024-07-18 20:45:19 +02001199" GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
1200syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] om[ap] ono[remap] smap snor[emap] tma[p] tno[remap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapMod,vimMapLhs
1201syn match vimMap "\<map\>" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
1202syn keyword vimMap no[remap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
dkearns16249702024-02-23 05:45:05 +11001203" GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod'
1204syn keyword vimMap cmapc[lear] imapc[lear] lmapc[lear] nmapc[lear] omapc[lear] smapc[lear] tmapc[lear] vmapc[lear] xmapc[lear] skipwhite nextgroup=vimMapMod
Doug Kearns99984fc2024-07-18 20:45:19 +02001205syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod
1206" GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
1207syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] tunma[p] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapMod,vimMapLhs
1208syn keyword vimUnmap unm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
1209
Doug Kearns6bdfeb02025-03-07 18:49:11 +01001210syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite nextgroup=vimMapRhs
1211syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite skipnl nextgroup=vimMapRhsContinue
dkearns5d67aef2024-03-10 04:01:22 +11001212syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs
Doug Kearns6bdfeb02025-03-07 18:49:11 +01001213syn match vimMapMod contained "\%#=1<\%(buffer\|expr\|nowait\|script\|silent\|special\|unique\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
1214syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader skipnl nextgroup=vimMapRhsContinue
dkearns5d67aef2024-03-10 04:01:22 +11001215" assume a continuation comment introduces the RHS
Doug Kearns6bdfeb02025-03-07 18:49:11 +01001216syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader
1217syn match vimMapLeader contained "\%#=1\c<\%(local\)\=leader>" contains=vimMapLeaderKey
1218syn keyword vimMapModKey contained buffer expr nowait script silent special unique
Bram Moolenaar071d4272004-06-13 20:20:40 +00001219syn case ignore
Doug Kearns6bdfeb02025-03-07 18:49:11 +01001220syn keyword vimMapLeaderKey contained leader localleader
Bram Moolenaar071d4272004-06-13 20:20:40 +00001221syn case match
1222
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001223" Menus: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001224" =====
dkearns62b26042024-03-10 03:43:28 +11001225" NOTE: tail comments disallowed
1226" GEN_SYN_VIM: vimCommand menu, START_STR='syn keyword vimMenu', END_STR='skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus'
1227syn keyword vimMenu 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] sme[nu] snoreme[nu] sunme[nu] tlm[enu] tln[oremenu] tlu[nmenu] tm[enu] tu[nmenu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] xme[nu] xnoreme[nu] xunme[nu] skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus
1228syn keyword vimMenu popu[p] skipwhite nextgroup=vimMenuBang,vimMenuName
1229syn region vimMenuRhs contained contains=@vimContinue,vimNotation start="|\@!\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|"
1230syn region vimMenuRhsContinue contained contains=@vimContinue,vimNotation start=+^\s*\%(\\\|"\\ \)+ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|"
dkearnsec21baf2024-03-20 04:04:42 +11001231syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs
1232syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+\ze\s*$" contained contains=vimMenuNotation,vimNotation skipwhite skipnl nextgroup=vimCmdSep,vimMenuRhsContinue
dkearns62b26042024-03-10 03:43:28 +11001233syn match vimMenuNotation "&\a\|&&\|\\\s\|\\\." contained
1234syn match vimMenuPriority "\<\d\+\%(\.\d\+\)*\>" contained skipwhite nextgroup=vimMenuName
1235syn match vimMenuMod "\c<\%(script\|silent\|special\)>" contained skipwhite nextgroup=vimMenuName,vimMenuPriority,vimMenuMod contains=vimMapModKey,vimMapModErr
1236syn keyword vimMenuStatus enable disable nextgroup=vimMenuName skipwhite
1237syn match vimMenuBang "\a\@1<=!" contained skipwhite nextgroup=vimMenuName,vimMenuMod
1238
1239syn region vimMenutranslate
1240 \ matchgroup=vimCommand start="\<menut\%[ranslate]\>"
1241 \ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ +
1242 \ end="$" matchgroup=vimCmdSep end="|" matchgroup=vimMenuClear end="\<clear\ze\s*\%(["#|]\|$\)"
1243 \ contains=@vimContinue,vimMenutranslateName keepend transparent
1244" oneline is sufficient to match the current formatting in runtime/lang/*.vim
1245syn match vimMenutranslateName "\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation
1246syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate
Bram Moolenaar071d4272004-06-13 20:20:40 +00001247
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001248" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001249" ======================
1250syn case ignore
Doug Kearns68ba6c22025-02-16 16:40:12 +01001251syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
dkearnse3e39342024-02-02 07:44:26 +11001252
Doug Kearns68ba6c22025-02-16 16:40:12 +01001253syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
1254syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
1255syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
1256syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
1257syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
1258syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
1259syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
dkearnse3e39342024-02-02 07:44:26 +11001260
Doug Kearns68ba6c22025-02-16 16:40:12 +01001261syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
1262syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
Doug Kearnsc29b5332025-04-26 20:14:15 +02001263" syn match vimNotation contained '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
Doug Kearns68ba6c22025-02-16 16:40:12 +01001264syn match vimNotation contained '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
1265syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
1266syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
dkearnse3e39342024-02-02 07:44:26 +11001267
Bram Moolenaar5c736222010-01-06 20:54:52 +01001268syn match vimBracket contained "[\\<>]"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001269syn case match
1270
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001271" User Function Highlighting: {{{2
Bram Moolenaar3577c6f2008-06-24 21:16:56 +00001272" (following Gautam Iyer's suggestion)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001273" ==========================
Doug Kearns1aa287e2025-02-10 22:00:27 +01001274syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
1275syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation,vim9MethodName,vim9Super,vim9This
dkearnsb4b3d7d2024-03-16 04:53:53 +11001276syn keyword vimFuncEcho contained ec ech echo
1277
Doug Kearns99984fc2024-07-18 20:45:19 +02001278syn match vimMap "\<map\%(\s\+(\)\@=" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
1279
Bram Moolenaar2547aa92020-07-26 17:00:44 +02001280" User Command Highlighting: {{{2
Bram Moolenaard2ea7cf2021-05-30 20:54:13 +02001281syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
Bram Moolenaar2547aa92020-07-26 17:00:44 +02001282
Doug Kearns025dc482025-02-23 15:48:52 +01001283" Vim user commands
1284
1285" Compiler plugins
Doug Kearns6bdfeb02025-03-07 18:49:11 +01001286syn match vimCompilerSet "\<CompilerSet\>" skipwhite nextgroup=vimSetArgs
Doug Kearns025dc482025-02-23 15:48:52 +01001287
1288" runtime/makemenu.vim
1289syn match vimSynMenu "\<SynMenu\>" skipwhite nextgroup=vimSynMenuPath
1290syn match vimSynMenuPath contained ".*\ze:" nextgroup=vimSynMenuColon contains=vimMenuNotation
1291syn match vimSynMenuColon contained ":" nextgroup=vimSynMenuName
1292syn match vimSynMenuName contained "\w\+"
1293
1294syn cluster vimExUserCmdList contains=vimCompilerSet,vimSynMenu
1295
Bram Moolenaar3577c6f2008-06-24 21:16:56 +00001296" Errors And Warnings: {{{2
1297" ====================
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001298if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
Doug Kearns818c6412024-10-06 17:00:48 +02001299 syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
Bram Moolenaar6c1e1572019-06-22 02:13:00 +02001300 syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
Bram Moolenaar5c736222010-01-06 20:54:52 +01001301 syn match vimElseIfErr "\<else\s\+if\>"
1302 syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
Bram Moolenaar3577c6f2008-06-24 21:16:56 +00001303endif
1304
Doug Kearnsc29b5332025-04-26 20:14:15 +02001305" If, While and Return: {{{2
1306" ====================
Doug Kearns68ba6c22025-02-16 16:40:12 +01001307syn match vimNotFunc "\%#=1\<\%(if\|el\%[seif]\|retu\%[rn]\|while\)\>" skipwhite nextgroup=@vimExprList,vimNotation
Doug Kearnsc29b5332025-04-26 20:14:15 +02001308syn match vimElse "\<el\%[se]\>" skipwhite nextgroup=vimComment,vim9Comment
1309syn match vimEndif "\<en\%[dif]\>" skipwhite nextgroup=vimComment,vim9Comment
Bram Moolenaar6c1e1572019-06-22 02:13:00 +02001310
Doug Kearnse85fdc72024-07-07 20:45:37 +02001311" Match: {{{2
1312" =====
1313syn match vimMatch "\<[23]\=mat\%[ch]\>" skipwhite nextgroup=vimMatchGroup,vimMatchNone
1314syn match vimMatchGroup contained "[[:alnum:]._-]\+" skipwhite nextgroup=vimMatchPattern
1315syn case ignore
1316syn keyword vimMatchNone contained none
1317syn case match
1318syn region vimMatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline
1319
Doug Kearnsbbe52522024-11-09 19:11:25 +01001320" Normal: {{{2
1321" ======
1322syn match vimNormal "\<norm\%[al]\>!\=" skipwhite nextgroup=vimNormalArg contains=vimBang
1323syn region vimNormalArg contained start="\S" skip=+\n\s*\\\|\n\s*["#]\\ + end="$" contains=@vimContinue
Bram Moolenaar05159a02005-02-26 23:04:13 +00001324
Doug Kearns2f5a8c02025-04-05 15:55:36 +02001325" Redir: {{{2
1326" =====
1327syn match vimRedir "\<redir\=\>" skipwhite nextgroup=vimRedirBang,vimRedirFileOperator,vimRedirVariableOperator,vimRedirRegister,vimRedirEnd
1328syn match vimRedirBang contained "\a\@1<=!" skipwhite nextgroup=vimRedirFileOperator
1329
1330syn match vimRedirFileOperator contained ">>\=" skipwhite nextgroup=vimRedirFile
1331syn region vimRedirFile contained
1332 \ start="\S"
1333 \ matchgroup=Normal
1334 \ end="\s*$"
1335 \ end="\s*\ze[|"]"
1336 \ nextgroup=vimCmdSep,vimComment
1337 \ contains=vimSpecFile
1338syn match vimRedirRegisterOperator contained ">>\="
1339syn match vimRedirRegister contained "@[a-zA-Z*+"]" nextgroup=vimRedirRegisterOperator
1340syn match vimRedirVariableOperator contained "=>>\=" skipwhite nextgroup=vimVar
1341syn keyword vimRedirEnd contained END
1342
Doug Kearns262e25e2024-06-14 20:16:35 +02001343" Sleep: {{{2
1344" =====
1345syn keyword vimSleep sl[eep] skipwhite nextgroup=vimSleepBang,vimSleepArg
1346syn match vimSleepBang contained "\a\@1<=!" skipwhite nextgroup=vimSleepArg
1347syn match vimSleepArg contained "\<\%(\d\+\)\=m\=\>"
1348
Doug Kearns9b171bd2025-04-10 19:59:22 +02001349" Sort: {{{2
1350" ====
1351syn match vimSort "\<sort\=\>" skipwhite nextgroup=vimSortBang,@vimSortOptions,vimSortPattern,vimCmdSep
1352syn match vimSortBang contained "\a\@1<=!" skipwhite nextgroup=@vimSortOptions,vimSortPattern,vimCmdSep
1353syn match vimSortOptionsError contained "\a\+"
1354syn match vimSortOptions contained "\<[ilur]*[nfxob]\=[ilur]*\>" skipwhite nextgroup=vimSortPattern,vimCmdSep
1355syn region vimSortPattern contained
1356 \ matchgroup=Delimiter
1357 \ start="\z([^[:space:][:alpha:]|]\)"
1358 \ skip="\\\\\|\\\z1"
1359 \ end="\z1"
1360 \ skipwhite nextgroup=@vimSortOptions,vimCmdSep
1361 \ contains=@vimSubstList
1362 \ oneline
1363
1364syn cluster vimSortOptions contains=vimSortOptions,vimSortOptionsError
1365
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001366" Syntax: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001367"=======
dkearns21ce1592024-01-29 04:54:08 +11001368syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial
1369syn region vimGroupList contained start=/^\s*["#]\\ \|^\s*\\\|[^[:space:],]\+\s*,/ skip=/\s*\n\s*\\\|\s*\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ / end=/[^[:space:],]\s*$\|[^[:space:],]\ze\s\+\w/ contains=@vimContinue,vimGroupSpecial
1370syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP
1371
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001372if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror")
Bram Moolenaar5c736222010-01-06 20:54:52 +01001373 syn match vimSynError contained "\i\+"
1374 syn match vimSynError contained "\i\+=" nextgroup=vimGroupList
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001375endif
dkearns21ce1592024-01-29 04:54:08 +11001376syn match vimSynContains contained "\<contain\%(s\|edin\)=" skipwhite skipnl nextgroup=vimGroupList
1377syn match vimSynKeyContainedin contained "\<containedin=" skipwhite skipnl nextgroup=vimGroupList
1378syn match vimSynNextgroup contained "\<nextgroup=" skipwhite skipnl nextgroup=vimGroupList
dkearnsc79646d2024-01-05 08:58:48 +11001379if has("conceal")
dkearns21ce1592024-01-29 04:54:08 +11001380 " no whitespace allowed after '='
dkearnsc79646d2024-01-05 08:58:48 +11001381 syn match vimSynCchar contained "\<cchar=" nextgroup=vimSynCcharValue
1382 syn match vimSynCcharValue contained "\S"
1383endif
1384
dkearns04e53632024-04-11 06:18:37 +10001385syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,@vimComment
Bram Moolenaard960d762011-09-21 19:22:10 +02001386syn cluster vimFuncBodyList add=vimSyntax
Bram Moolenaar071d4272004-06-13 20:20:40 +00001387
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001388" Syntax: case {{{2
Bram Moolenaar5c736222010-01-06 20:54:52 +01001389syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001390if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror")
Bram Moolenaar5c736222010-01-06 20:54:52 +01001391 syn match vimSynCaseError contained "\i\+"
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001392endif
Bram Moolenaar5c736222010-01-06 20:54:52 +01001393syn keyword vimSynCase contained ignore match
Bram Moolenaar071d4272004-06-13 20:20:40 +00001394
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001395" Syntax: clear {{{2
Bram Moolenaar5c736222010-01-06 20:54:52 +01001396syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList
Bram Moolenaar071d4272004-06-13 20:20:40 +00001397
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001398" Syntax: cluster {{{2
Bram Moolenaar5c736222010-01-06 20:54:52 +01001399syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
dkearns21ce1592024-01-29 04:54:08 +11001400syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
1401syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList
1402syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList
Bram Moolenaar071d4272004-06-13 20:20:40 +00001403
Doug Kearns0fab8912025-03-10 21:04:53 +01001404" Syntax: conceal {{{2
1405syn match vimSynType contained "\<conceal\>" skipwhite nextgroup=vimSynConceal,vimSynConcealError
1406if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynconcealerror")
1407 syn match vimSynConcealError contained "\i\+"
Brad Kingd4634a22024-01-03 10:17:24 -05001408endif
Doug Kearns0fab8912025-03-10 21:04:53 +01001409syn keyword vimSynConceal contained on off
1410
1411" Syntax: foldlevel {{{2
1412syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldlevel,vimSynFoldlevelError
1413if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldlevelerror")
1414 syn match vimSynFoldlevelError contained "\i\+"
1415endif
1416syn keyword vimSynFoldlevel contained start minimum
Brad Kingd4634a22024-01-03 10:17:24 -05001417
Bram Moolenaar13d5aee2016-01-21 23:36:05 +01001418" Syntax: iskeyword {{{2
Doug Kearns0fab8912025-03-10 21:04:53 +01001419syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimSynIskeyword
1420syn keyword vimSynIskeyword contained clear
1421syn match vimSynIskeyword contained "\S\+" contains=vimSynIskeywordSep
1422syn match vimSynIskeywordSep contained ","
Bram Moolenaar13d5aee2016-01-21 23:36:05 +01001423
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001424" Syntax: include {{{2
Bram Moolenaar5c736222010-01-06 20:54:52 +01001425syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
Bram Moolenaar071d4272004-06-13 20:20:40 +00001426
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001427" Syntax: keyword {{{2
dkearns21ce1592024-01-29 04:54:08 +11001428syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
Bram Moolenaar5c736222010-01-06 20:54:52 +01001429syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
dkearns21ce1592024-01-29 04:54:08 +11001430syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
Doug Kearns0fab8912025-03-10 21:04:53 +01001431syn match vimSynKeyOpt contained "\%#=1\<\%(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001432
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001433" Syntax: match {{{2
dkearns21ce1592024-01-29 04:54:08 +11001434syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
Bram Moolenaar5c736222010-01-06 20:54:52 +01001435syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
dkearns21ce1592024-01-29 04:54:08 +11001436syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup
Doug Kearns0fab8912025-03-10 21:04:53 +01001437syn match vimSynMtchOpt contained "\%#=1\<\%(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001438
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001439" Syntax: off and on {{{2
Bram Moolenaar5c736222010-01-06 20:54:52 +01001440syn keyword vimSynType contained enable list manual off on reset
Bram Moolenaar071d4272004-06-13 20:20:40 +00001441
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001442" Syntax: region {{{2
dkearns21ce1592024-01-29 04:54:08 +11001443syn cluster vimSynRegPatGroup contains=@vimContinue,vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
1444syn cluster vimSynRegGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
Bram Moolenaar5c736222010-01-06 20:54:52 +01001445syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
Doug Kearns0fab8912025-03-10 21:04:53 +01001446syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynRegGroup
1447syn match vimSynRegOpt contained "\%#=1\<\%(conceal\%(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
dkearns21ce1592024-01-29 04:54:08 +11001448syn match vimSynReg contained "\<\%(start\|skip\|end\)=" nextgroup=vimSynRegPat
Bram Moolenaar5c736222010-01-06 20:54:52 +01001449syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
dkearns21ce1592024-01-29 04:54:08 +11001450syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip=/\\\\\|\\\z1\|\n\s*\\\|\n\s*"\\ / end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
Doug Kearns0fab8912025-03-10 21:04:53 +01001451syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\="
1452syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\=," nextgroup=vimSynPatMod
Bram Moolenaar5c736222010-01-06 20:54:52 +01001453syn match vimSynPatMod contained "lc=\d\+"
1454syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
1455syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
1456syn match vimSynNotPatRange contained "\\\\\|\\\["
1457syn match vimMtchComment contained '"[^"]\+$'
Bram Moolenaar071d4272004-06-13 20:20:40 +00001458
Doug Kearns0fab8912025-03-10 21:04:53 +01001459" Syntax: spell {{{2
1460syn keyword vimSynType contained spell skipwhite nextgroup=vimSynSpell,vimSynSpellError
1461if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynspellerror")
1462 syn match vimSynSpellError contained "\i\+"
1463endif
1464syn keyword vimSynSpell contained default notoplevel toplevel
1465
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001466" Syntax: sync {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001467" ============
Doug Kearns0fab8912025-03-10 21:04:53 +01001468syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncClear,vimSyncMatch,vimSyncError,vimSyncRegion,vimSyncArgs
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001469if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror")
Bram Moolenaar5c736222010-01-06 20:54:52 +01001470 syn match vimSyncError contained "\i\+"
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001471endif
Doug Kearns0fab8912025-03-10 21:04:53 +01001472
1473syn region vimSyncArgs contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=vimSyncLines,vimSyncLinebreak,vimSyncLinecont,vimSyncFromstart,vimSyncCcomment
1474
1475syn keyword vimSyncCcomment contained ccomment skipwhite nextgroup=vimGroupName
1476syn keyword vimSyncClear contained clear skipwhite nextgroup=vimSyncGroupName
1477syn keyword vimSyncFromstart contained fromstart
Bram Moolenaar5c736222010-01-06 20:54:52 +01001478syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName
Doug Kearnsb55f0222025-03-15 09:29:31 +01001479syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynRegion
Doug Kearns0fab8912025-03-10 21:04:53 +01001480syn match vimSyncLinebreak contained "\<linebreaks=" nextgroup=vimNumber
Bram Moolenaar5c736222010-01-06 20:54:52 +01001481syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat
Doug Kearns0fab8912025-03-10 21:04:53 +01001482syn match vimSyncLines contained "\<lines=" nextgroup=vimNumber
1483syn match vimSyncLines contained "\<minlines=" nextgroup=vimNumber
1484syn match vimSyncLines contained "\<maxlines=" nextgroup=vimNumber
1485syn match vimSyncGroupName contained "\<\h\w*\>" skipwhite nextgroup=vimSyncKey
1486syn match vimSyncKey contained "\<grouphere\>" skipwhite nextgroup=vimSyncGroup
1487syn match vimSyncKey contained "\<groupthere\>" skipwhite nextgroup=vimSyncGroup
1488syn match vimSyncGroup contained "\<\h\w*\>" skipwhite nextgroup=vimSynRegPat,vimSyncNone
Bram Moolenaar5c736222010-01-06 20:54:52 +01001489syn keyword vimSyncNone contained NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +00001490
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001491" Additional IsCommand: here by reasons of precedence {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001492" ====================
Bram Moolenaar5c736222010-01-06 20:54:52 +01001493syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation
Bram Moolenaar071d4272004-06-13 20:20:40 +00001494
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001495" Highlighting: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001496" ============
dkearns04e53632024-04-11 06:18:37 +10001497syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,@vimComment
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001498if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
Bram Moolenaar51ad4ea2018-04-06 11:14:11 +02001499 syn match vimHiCtermError contained "\D\i*"
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001500endif
Bram Moolenaar5c736222010-01-06 20:54:52 +01001501syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster
dkearns9530fe42024-03-19 05:19:51 +11001502syn match vimHiBang contained "\a\@1<=!" skipwhite nextgroup=@vimHighlightCluster
Bram Moolenaard960d762011-09-21 19:22:10 +02001503
Bram Moolenaar5c736222010-01-06 20:54:52 +01001504syn match vimHiGroup contained "\i\+"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001505syn case ignore
Doug Kearns0fab8912025-03-10 21:04:53 +01001506syn keyword vimHiNone contained NONE
dkearnsb614b282024-02-12 03:13:34 +11001507syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl underdashed underdotted underdouble
Bram Moolenaar5c736222010-01-06 20:54:52 +01001508syn keyword vimFgBgAttrib contained none bg background fg foreground
Bram Moolenaar071d4272004-06-13 20:20:40 +00001509syn case match
Bram Moolenaar5c736222010-01-06 20:54:52 +01001510syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
1511syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList
Bram Moolenaar071d4272004-06-13 20:20:40 +00001512syn case ignore
Bram Moolenaard2ea7cf2021-05-30 20:54:13 +02001513syn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey grey40 grey50 grey90 lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred lightyellow magenta red seagreen white yellow
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001514syn match vimHiCtermColor contained "\<color\d\{1,3}\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001515syn case match
Doug Kearns0fab8912025-03-10 21:04:53 +01001516
Bram Moolenaar5c736222010-01-06 20:54:52 +01001517syn match vimHiFontname contained "[a-zA-Z\-*]\+"
1518syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'"
1519syn match vimHiGuiRgb contained "#\x\{6}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001520
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001521" Highlighting: hi group key=arg ... {{{2
Doug Kearns0fab8912025-03-10 21:04:53 +01001522syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiNone,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment
dkearns9530fe42024-03-19 05:19:51 +11001523syn region vimHiKeyList contained start="\i\+" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001524if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror")
Bram Moolenaar5c736222010-01-06 20:54:52 +01001525 syn match vimHiKeyError contained "\i\+="he=e-1
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001526endif
Bram Moolenaar5c736222010-01-06 20:54:52 +01001527syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList
dkearns9530fe42024-03-19 05:19:51 +11001528syn match vimHiStartStop contained "\c\%(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption
Bram Moolenaar5c736222010-01-06 20:54:52 +01001529syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
Bram Moolenaar83d1b192015-04-13 14:22:40 +02001530syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
Bram Moolenaar2547aa92020-07-26 17:00:44 +02001531syn match vimHiCtermul contained "\cctermul="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
PMuncha606f3a2023-11-15 15:35:49 +01001532syn match vimHiCtermfont contained "\cctermfont="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
Bram Moolenaar5c736222010-01-06 20:54:52 +01001533syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
1534syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
1535syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
1536syn match vimHiTermcap contained "\S\+" contains=vimNotation
Bram Moolenaar83d1b192015-04-13 14:22:40 +02001537syn match vimHiNmbr contained '\d\+'
Bram Moolenaar071d4272004-06-13 20:20:40 +00001538
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001539" Highlight: clear {{{2
dkearns9530fe42024-03-19 05:19:51 +11001540syn keyword vimHiClear contained clear skipwhite nextgroup=vimGroup,vimHiGroup
Bram Moolenaar071d4272004-06-13 20:20:40 +00001541
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001542" Highlight: link {{{2
Bram Moolenaard2855f52018-07-31 22:23:58 +02001543" see tst24 (hi def vs hi) (Jul 06, 2018)
1544"syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
dkearns9530fe42024-03-19 05:19:51 +11001545" TODO: simplify and allow line continuations --djk
1546syn region vimHiLink contained matchgroup=Type start="\%(\<hi\%[ghlight]!\=\s\+\)\@<=\%(\%(def\%[ault]\s\+\)\=link\>\|\<def\%[ault]\>\)" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster
Bram Moolenaar071d4272004-06-13 20:20:40 +00001547
Bram Moolenaar1ff14ba2019-11-02 14:09:23 +01001548" Control Characters: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001549" ==================
Bram Moolenaar5c736222010-01-06 20:54:52 +01001550syn match vimCtrlChar "[- -]"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001551
Doug Kearnsa577e422025-05-17 16:29:13 +02001552" Embedded Scripts: {{{2
1553" ================
1554" perl,ruby : Benoit Cerrina
1555" python,tcl : Johannes Zellner
1556" mzscheme, lua : Charles Campbell
1557
1558" Allows users to specify the type of embedded script highlighting
1559" they want: (lua/mzscheme/perl/python/ruby/tcl support)
1560" g:vimsyn_embed == 0 : don't embed any scripts
1561" g:vimsyn_embed =~# 'l' : embed Lua
1562" g:vimsyn_embed =~# 'm' : embed MzScheme
1563" g:vimsyn_embed =~# 'p' : embed Perl
1564" g:vimsyn_embed =~# 'P' : embed Python
1565" g:vimsyn_embed =~# 'r' : embed Ruby
1566" g:vimsyn_embed =~# 't' : embed Tcl
1567
1568let s:interfaces = get(g:, "vimsyn_embed", "lP")
1569
1570" [-- lua --] {{{3
1571if s:interfaces =~# 'l'
1572 syn include @vimLuaScript syntax/lua.vim
1573 unlet b:current_syntax
1574 syn clear luaParenError " See issue #11277
1575endif
1576
1577syn keyword vimLua lua skipwhite nextgroup=vimLuaHeredoc,vimLuaStatement
1578syn keyword vimLua luado skipwhite nextgroup=vimLuaStatement
1579syn keyword vimLua luafile
1580
1581syn region vimLuaStatement contained
1582 \ start="\S"
1583 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1584 \ end="$"
1585 \ contains=@vimLuaScript,@vimContinue
1586VimFoldl syn region vimLuaHeredoc contained
1587 \ matchgroup=vimScriptHeredocStart
1588 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1589 \ matchgroup=vimScriptHeredocStop
1590 \ end=+^\z1$+
1591 \ contains=@vimLuaScript
1592VimFoldl syn region vimLuaHeredoc contained
1593 \ matchgroup=vimScriptHeredocStart
1594 \ start=+<<\ze\s*$+
1595 \ matchgroup=vimScriptHeredocStop
1596 \ end=+^\.$+
1597 \ contains=@vimLuaScript
1598VimFoldl syn region vimLuaHeredoc contained
1599 \ matchgroup=vimScriptHeredocStart
1600 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1601 \ matchgroup=vimScriptHeredocStop
1602 \ end=+^\z1\=\z2$+
1603 \ contains=@vimLuaScript
1604VimFoldl syn region vimLuaHeredoc contained
1605 \ matchgroup=vimScriptHeredocStart
1606 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1607 \ matchgroup=vimScriptHeredocStop
1608 \ end=+^\z1\=\.$+
1609 \ contains=@vimLuaScript
1610
1611" [-- mzscheme --] {{{3
1612if s:interfaces =~# 'm'
1613 let s:iskKeep = &isk
1614 syn include @vimMzSchemeScript syntax/scheme.vim
1615 unlet b:current_syntax
1616 let &isk = s:iskKeep
1617endif
1618
1619syn keyword vimMzScheme mz[scheme] skipwhite nextgroup=vimMzSchemeHeredoc,vimMzSchemeStatement
1620syn keyword vimMzScheme mzf[ile]
1621
1622syn region vimMzSchemeStatement contained
1623 \ start="\S"
1624 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1625 \ end="$"
1626 \ contains=@vimMzSchemeScript,@vimContinue
1627VimFoldm syn region vimMzSchemeHeredoc contained
1628 \ matchgroup=vimScriptHeredocStart
1629 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1630 \ matchgroup=vimScriptHeredocStop
1631 \ end=+^\z1$+
1632 \ contains=@vimMzSchemeScript
1633VimFoldm syn region vimMzSchemeHeredoc contained
1634 \ matchgroup=vimScriptHeredocStart
1635 \ start=+<<\ze\s*$+
1636 \ matchgroup=vimScriptHeredocStop
1637 \ end=+^\.$+
1638 \ contains=@vimMzSchemeScript
1639VimFoldm syn region vimMzSchemeHeredoc contained
1640 \ matchgroup=vimScriptHeredocStart
1641 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1642 \ matchgroup=vimScriptHeredocStop
1643 \ end=+^\z1\=\z2$+
1644 \ contains=@vimMzSchemeScript
1645VimFoldm syn region vimMzSchemeHeredoc contained
1646 \ matchgroup=vimScriptHeredocStart
1647 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1648 \ matchgroup=vimScriptHeredocStop
1649 \ end=+^\z1\=\.$+
1650 \ contains=@vimMzSchemeScript
1651
1652" [-- perl --] {{{3
1653if s:interfaces =~# 'p'
1654 syn include @vimPerlScript syntax/perl.vim
1655 unlet b:current_syntax
1656endif
1657
1658syn keyword vimPerl pe[rl] skipwhite nextgroup=vimPerlHeredoc,vimPerlStatement
1659syn keyword vimPerl perld[o] skipwhite nextgroup=vimPerlStatement
1660
1661syn region vimPerlStatement contained
1662 \ start="\S"
1663 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1664 \ end="$"
1665 \ contains=@vimPerlScript,@vimContinue
1666VimFoldp syn region vimPerlHeredoc contained
1667 \ matchgroup=vimScriptHeredocStart
1668 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1669 \ matchgroup=vimScriptHeredocStop
1670 \ end=+^\z1$+ contains=@vimPerlScript
1671VimFoldp syn region vimPerlHeredoc contained
1672 \ matchgroup=vimScriptHeredocStart
1673 \ start=+<<\ze\s*$+ matchgroup=vimScriptHeredocStop
1674 \ end=+^\.$+
1675 \ contains=@vimPerlScript
1676VimFoldp syn region vimPerlHeredoc contained
1677 \ matchgroup=vimScriptHeredocStart
1678 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1679 \ matchgroup=vimScriptHeredocStop
1680 \ end=+^\z1\=\z2$+
1681 \ contains=@vimPerlScript
1682VimFoldp syn region vimPerlHeredoc contained
1683 \ matchgroup=vimScriptHeredocStart
1684 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1685 \ matchgroup=vimScriptHeredocStop
1686 \ end=+^\z1\=\.$+
1687 \ contains=@vimPerlScript
1688
1689" [-- python --] {{{3
1690if s:interfaces =~# 'P'
1691 syn include @vimPythonScript syntax/python2.vim
1692 unlet b:current_syntax
1693endif
1694
1695syn keyword vimPython py[thon] skipwhite nextgroup=vimPythonHeredoc,vimPythonStatement
1696syn keyword vimPython pydo skipwhite nextgroup=vimPythonStatement
1697syn keyword vimPython pyfile
1698
1699syn region vimPythonStatement contained
1700 \ start="\S"
1701 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1702 \ end="$"
1703 \ contains=@vimPythonScript,@vimContinue
1704VimFoldP syn region vimPythonHeredoc contained
1705 \ matchgroup=vimScriptHeredocStart
1706 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1707 \ matchgroup=vimScriptHeredocStop
1708 \ end=+^\z1$+
1709 \ contains=@vimPythonScript
1710VimFoldP syn region vimPythonHeredoc contained
1711 \ matchgroup=vimScriptHeredocStart
1712 \ start=+<<\ze\s*$+
1713 \ matchgroup=vimScriptHeredocStop
1714 \ end=+^\.$+
1715 \ contains=@vimPythonScript
1716VimFoldP syn region vimPythonHeredoc contained
1717 \ matchgroup=vimScriptHeredocStart
1718 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1719 \ matchgroup=vimScriptHeredocStop
1720 \ end=+^\z1\=\z2$+
1721 \ contains=@vimPythonScript
1722VimFoldP syn region vimPythonHeredoc contained
1723 \ matchgroup=vimScriptHeredocStart
1724 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1725 \ matchgroup=vimScriptHeredocStop
1726 \ end=+^\z1\=\.$+
1727 \ contains=@vimPythonScript
1728
1729" [-- python3 --] {{{3
1730if s:interfaces =~# 'P'
1731 syn include @vimPython3Script syntax/python.vim
1732 unlet b:current_syntax
1733endif
1734
1735syn keyword vimPython3 python3 py3 skipwhite nextgroup=vimPython3Heredoc,vimPython3Statement
1736syn keyword vimPython3 py3do skipwhite nextgroup=vimPython3Statement
1737syn keyword vimPython3 py3file
1738
1739syn region vimPython3Statement contained
1740 \ start="\S"
1741 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1742 \ end="$"
1743 \ contains=@vimPython3Script,@vimContinue
1744VimFoldP syn region vimPython3Heredoc contained
1745 \ matchgroup=vimScriptHeredocStart
1746 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1747 \ matchgroup=vimScriptHeredocStop
1748 \ end=+^\z1$+
1749 \ contains=@vimPython3Script
1750VimFoldP syn region vimPython3Heredoc contained
1751 \ matchgroup=vimScriptHeredocStart
1752 \ start=+<<\ze\s*$+
1753 \ matchgroup=vimScriptHeredocStop
1754 \ end=+^\.$+
1755 \ contains=@vimPython3Script
1756VimFoldP syn region vimPython3Heredoc contained
1757 \ matchgroup=vimScriptHeredocStart
1758 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1759 \ matchgroup=vimScriptHeredocStop
1760 \ end=+^\z1\=\z2$+
1761 \ contains=@vimPython3Script
1762VimFoldP syn region vimPython3Heredoc contained
1763 \ matchgroup=vimScriptHeredocStart
1764 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1765 \ matchgroup=vimScriptHeredocStop
1766 \ end=+^\z1\=\.$+
1767 \ contains=@vimPython3Script
1768
1769" [-- pythonx --] {{{3
1770if s:interfaces =~# 'P'
1771 if &pyxversion == 2
1772 syn cluster vimPythonXScript contains=@vimPythonScript
1773 else
1774 syn cluster vimPythonXScript contains=@vimPython3Script
1775 endif
1776endif
1777
1778syn keyword vimPythonX pythonx pyx skipwhite nextgroup=vimPythonXHeredoc,vimPythonXStatement
1779syn keyword vimPythonX pyxdo skipwhite nextgroup=vimPythonXStatement
1780syn keyword vimPythonX pyxfile
1781
1782syn region vimPythonXStatement contained
1783 \ start="\S"
1784 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1785 \ end="$"
1786 \ contains=@vimPythonXScript,@vimContinue
1787VimFoldP syn region vimPythonXHeredoc contained
1788 \ matchgroup=vimScriptHeredocStart
1789 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1790 \ matchgroup=vimScriptHeredocStop
1791 \ end=+^\z1$+
1792 \ contains=@vimPythonXScript
1793VimFoldP syn region vimPythonXHeredoc contained
1794 \ matchgroup=vimScriptHeredocStart
1795 \ start=+<<\ze\s*$+
1796 \ matchgroup=vimScriptHeredocStop
1797 \ end=+^\.$+
1798 \ contains=@vimPythonXScript
1799VimFoldP syn region vimPythonXHeredoc contained
1800 \ matchgroup=vimScriptHeredocStart
1801 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1802 \ matchgroup=vimScriptHeredocStop
1803 \ end=+^\z1\=\z2$+
1804 \ contains=@vimPythonXScript
1805VimFoldP syn region vimPythonXHeredoc contained
1806 \ matchgroup=vimScriptHeredocStart
1807 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1808 \ matchgroup=vimScriptHeredocStop
1809 \ end=+^\z1\=\.$+
1810 \ contains=@vimPythonXScript
1811
1812" [-- ruby --] {{{3
1813if s:interfaces =~# 'r'
1814 syn include @vimRubyScript syntax/ruby.vim
1815 unlet b:current_syntax
1816endif
1817
1818syn keyword vimRuby rub[y] skipwhite nextgroup=vimRubyHeredoc,vimRubyStatement
1819syn keyword vimRuby rubyd[o] skipwhite nextgroup=vimRubyStatement
1820syn keyword vimRuby rubyf[ile]
1821
1822syn region vimRubyStatement contained
1823 \ start="\S"
1824 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1825 \ end="$"
1826 \ contains=@vimRubyScript,@vimContinue
1827VimFoldr syn region vimRubyHeredoc contained
1828 \ matchgroup=vimScriptHeredocStart
1829 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1830 \ matchgroup=vimScriptHeredocStop
1831 \ end=+^\z1$+
1832 \ contains=@vimRubyScript
1833VimFoldr syn region vimRubyHeredoc contained
1834 \ matchgroup=vimScriptHeredocStart
1835 \ start=+<<\ze\s*$+ matchgroup=vimScriptHeredocStop
1836 \ end=+^\.$+
1837 \ contains=@vimRubyScript
1838VimFoldr syn region vimRubyHeredoc contained
1839 \ matchgroup=vimScriptHeredocStart
1840 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1841 \ matchgroup=vimScriptHeredocStop
1842 \ end=+^\z1\=\z2$+
1843 \ contains=@vimRubyScript
1844VimFoldr syn region vimRubyHeredoc contained
1845 \ matchgroup=vimScriptHeredocStart
1846 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1847 \ matchgroup=vimScriptHeredocStop
1848 \ end=+^\z1\.$+
1849 \ contains=@vimRubyScript
1850
1851" [-- tcl --] {{{3
1852if s:interfaces =~# 't'
1853 syn include @vimTclScript syntax/tcl.vim
1854 unlet b:current_syntax
1855endif
1856
1857syn keyword vimTcl tcl skipwhite nextgroup=vimTclHeredoc,vimTclStatement
1858syn keyword vimTcl tcld[o] skipwhite nextgroup=vimTclStatement
1859syn keyword vimTcl tclf[ile]
1860syn region vimTclStatement contained
1861 \ start="\S"
1862 \ skip=+\n\s*\%(\\\|["#]\\ \)+
1863 \ end="$"
1864 \ contains=@vimTclScript,@vimContinue
1865VimFoldt syn region vimTclHeredoc contained
1866 \ matchgroup=vimScriptHeredocStart
1867 \ start=+<<\s*\z(\S\+\)\ze\s*$+
1868 \ matchgroup=vimScriptHeredocStop
1869 \ end=+^\z1$+
1870 \ contains=@vimTclScript
1871VimFoldt syn region vimTclHeredoc contained
1872 \ matchgroup=vimScriptHeredocStart
1873 \ start=+<<\ze\s*$+
1874 \ matchgroup=vimScriptHeredocStop
1875 \ end=+^\.$+
1876 \ contains=@vimTclScript
1877VimFoldt syn region vimTclHeredoc contained
1878 \ matchgroup=vimScriptHeredocStart
1879 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+
1880 \ matchgroup=vimScriptHeredocStop
1881 \ end=+^\z1\=\z2$+
1882 \ contains=@vimTclScript
1883VimFoldt syn region vimTclHeredoc contained
1884 \ matchgroup=vimScriptHeredocStart
1885 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+
1886 \ matchgroup=vimScriptHeredocStop
1887 \ end=+^\z1\=\.$+
1888 \ contains=@vimTclScript
1889
1890unlet s:interfaces
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001891" Beginners - Patterns that involve ^ {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001892" =========
Doug Kearns35699f12024-09-19 19:51:59 +02001893Vim9 syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle extend
1894VimL syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle extend
Doug Kearnsd65e58f2024-07-17 19:34:14 +02001895
Bram Moolenaar5c736222010-01-06 20:54:52 +01001896syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
dkearns04e53632024-04-11 06:18:37 +10001897syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
dkearns059cbe82024-06-12 03:27:53 +10001898
dkearnsae321b52024-06-15 23:06:17 +10001899" allowed anywhere in the file
1900if !s:vim9script
1901 syn match vimShebangError "^\s*\zs#!.*" display
1902endif
1903syn match vimShebang "\%^#!.*" display
1904
dkearns21ce1592024-01-29 04:54:08 +11001905syn match vimContinue "^\s*\zs\\"
Doug Kearns4f010c92025-02-13 20:24:42 +01001906syn match vimContinueComment '^\s*\zs["#]\\ .*' extend
1907syn match vim9ContinueComment "^\s*\zs#\\ .*" extend
Doug Kearns818c6412024-10-06 17:00:48 +02001908syn cluster vimContinue contains=vimContinue,vimContinueComment
1909syn cluster vim9Continue contains=vimContinue,vim9ContinueComment
1910
Doug Kearnsc29b5332025-04-26 20:14:15 +02001911syn region vimString start='^\s*\\"' end='"' oneline keepend contains=@vimStringGroup,vimContinue
1912syn region vimString start="^\s*\\'" end="'" oneline keepend contains=vimQuoteEscape,vimContinue
1913
Bram Moolenaar5c736222010-01-06 20:54:52 +01001914syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
dkearns04e53632024-04-11 06:18:37 +10001915syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained
Bram Moolenaar071d4272004-06-13 20:20:40 +00001916
Bram Moolenaar18144c82006-04-12 21:52:12 +00001917" Searches And Globals: {{{2
1918" ====================
Doug Kearnsc273f1a2025-01-20 21:53:01 +01001919VimL syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
Bram Moolenaar5c736222010-01-06 20:54:52 +01001920syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
Doug Kearnsc273f1a2025-01-20 21:53:01 +01001921Vim9 syn match vim9Search '^\s*:[/?].*' contains=vim9SearchDelim
1922syn match vim9SearchDelim '^\s*\zs:[/?]\|[/?]$' contained contains=vimCmdSep
dkearns2c51e152024-02-27 07:10:18 +11001923syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
1924syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
Bram Moolenaare2f98b92006-03-29 21:18:24 +00001925
Hirohito Higashifbe4a8f2025-04-27 15:28:30 +02001926" Vim9 script Regions: {{{2
dkearns04e53632024-04-11 06:18:37 +10001927" ==================
1928
1929if s:vim9script
Doug Kearnsce064932024-04-13 18:24:01 +02001930 syn cluster vimLegacyTop contains=TOP,vim9LegacyHeader,vim9Comment,vim9LineComment
1931 VimFoldH syn region vim9LegacyHeader start="\%^" end="^\ze\s*vim9s\%[cript]\>" contains=@vimLegacyTop,vimComment,vimLineComment
dkearns04e53632024-04-11 06:18:37 +10001932
Doug Kearnsce064932024-04-13 18:24:01 +02001933 syn keyword vim9Vim9ScriptArg noclear contained
1934 syn keyword vim9Vim9Script vim9s[cript] nextgroup=vim9Vim9ScriptArg skipwhite
dkearns04e53632024-04-11 06:18:37 +10001935endif
1936
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001937" Synchronize (speed) {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001938"============
Bram Moolenaar3577c6f2008-06-24 21:16:56 +00001939if exists("g:vimsyn_minlines")
1940 exe "syn sync minlines=".g:vimsyn_minlines
Bram Moolenaar071d4272004-06-13 20:20:40 +00001941endif
Bram Moolenaar03413f42016-04-12 21:07:15 +02001942exe "syn sync maxlines=".s:vimsyn_maxlines
Bram Moolenaar071d4272004-06-13 20:20:40 +00001943syn sync linecont "^\s\+\\"
dkearns62b26042024-03-10 03:43:28 +11001944syn sync linebreaks=1
Bram Moolenaar071d4272004-06-13 20:20:40 +00001945syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"
1946
Bram Moolenaar5c736222010-01-06 20:54:52 +01001947" ====================
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001948" Highlighting Settings {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00001949" ====================
1950
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001951if !exists("skip_vim_syntax_inits")
1952 if !exists("g:vimsyn_noerror")
1953 hi def link vimBehaveError vimError
1954 hi def link vimCollClassErr vimError
1955 hi def link vimErrSetting vimError
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001956 hi def link vimFTError vimError
1957 hi def link vimFunctionError vimError
1958 hi def link vimFunc vimError
1959 hi def link vimHiAttribList vimError
1960 hi def link vimHiCtermError vimError
1961 hi def link vimHiKeyError vimError
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001962 hi def link vimMapModErr vimError
dkearnsae321b52024-06-15 23:06:17 +10001963 hi def link vimShebangError vimError
Doug Kearns9b171bd2025-04-10 19:59:22 +02001964 hi def link vimSortOptionsError Error
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001965 hi def link vimSubstFlagErr vimError
1966 hi def link vimSynCaseError vimError
Doug Kearns0fab8912025-03-10 21:04:53 +01001967 hi def link vimSyncError vimError
1968 hi def link vimSynConcealError vimError
1969 hi def link vimSynError vimError
1970 hi def link vimSynFoldlevelError vimError
1971 hi def link vimSynIskeywordError vimError
1972 hi def link vimSynSpellError vimError
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001973 hi def link vimBufnrWarn vimWarn
Doug Kearns818c6412024-10-06 17:00:48 +02001974
1975 hi def link vim9TypeAliasError vimError
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001976 endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001977
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001978 hi def link vimAbb vimCommand
1979 hi def link vimAddress vimMark
dkearnsc4aef9a2024-03-04 02:42:47 +11001980 hi def link vimAugroupBang vimBang
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001981 hi def link vimAugroupError vimError
1982 hi def link vimAugroupKey vimCommand
Doug Kearnsfa3b1042025-04-22 19:48:13 +02001983 hi def link vimAutocmd vimCommand
1984 hi def link vimAutocmdBang vimBang
1985 hi def link vimAutocmdPatternEscape Special
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001986 hi def link vimAutoEvent Type
Doug Kearnsfa3b1042025-04-22 19:48:13 +02001987 hi def link vimAutoEventGlob Type
1988 hi def link vimAutocmdBufferPattern Special
1989 hi def link vimAutocmdMod Special
1990 hi def link vimAutocmdPatternSep vimSep
dkearnsb614b282024-02-12 03:13:34 +11001991 hi def link vimBang vimOper
dkearns2c51e152024-02-27 07:10:18 +11001992 hi def link vimBehaveBang vimBang
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001993 hi def link vimBehaveModel vimBehave
1994 hi def link vimBehave vimCommand
1995 hi def link vimBracket Delimiter
Doug Kearns99984fc2024-07-18 20:45:19 +02001996 hi def link vimCall vimCommand
dkearnsa3bddb72024-06-14 01:48:10 +10001997 hi def link vimCatch vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02001998 hi def link vimCmplxRepeat SpecialChar
1999 hi def link vimCommand Statement
2000 hi def link vimComment Comment
Doug Kearnsfc64ac02024-06-22 11:20:36 +02002001 hi def link vimCommentError vimError
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002002 hi def link vimCommentString vimString
2003 hi def link vimCommentTitle PreProc
2004 hi def link vimCondHL vimCommand
dkearnsf6869212023-12-11 01:53:24 +11002005 hi def link vimConst vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002006 hi def link vimContinue Special
dkearns21ce1592024-01-29 04:54:08 +11002007 hi def link vimContinueComment vimComment
Doug Kearnsc29b5332025-04-26 20:14:15 +02002008 hi def link vimContinueString vimString
Doug Kearns4a530a62025-02-03 18:59:09 +01002009 hi def link vimCount Number
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002010 hi def link vimCtrlChar SpecialChar
Doug Kearns4a530a62025-02-03 18:59:09 +01002011 hi def link vimDebuggreedy vimCommand
Doug Kearnsfc64ac02024-06-22 11:20:36 +02002012 hi def link vimDefComment vim9Comment
dkearns35e6f4c2024-03-22 06:41:10 +11002013 hi def link vimDefKey vimCommand
Doug Kearns1aa287e2025-02-10 22:00:27 +01002014 hi def link vimDefParam vimVar
Doug Kearns3c07eb02024-09-02 10:03:37 +02002015 hi def link vimDelcommand vimCommand
2016 hi def link vimDelcommandAttr vimUserCmdAttr
Doug Kearnsfa3b1042025-04-22 19:48:13 +02002017 hi def link vimDoautocmd vimCommand
2018 hi def link vimDoautocmdMod Special
dkearnsb1427b42024-02-28 05:59:30 +11002019 hi def link vimEcho vimCommand
dkearns61887b32024-03-15 23:45:48 +11002020 hi def link vimEchohlNone vimGroup
2021 hi def link vimEchohl vimCommand
Doug Kearnsc29b5332025-04-26 20:14:15 +02002022 hi def link vimElse vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002023 hi def link vimElseIfErr Error
dkearns35e6f4c2024-03-22 06:41:10 +11002024 hi def link vimEndfunction vimCommand
2025 hi def link vimEnddef vimCommand
Doug Kearnsc29b5332025-04-26 20:14:15 +02002026 hi def link vimEndif vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002027 hi def link vimEnvvar PreProc
2028 hi def link vimError Error
Bram Moolenaar6ba83ba2022-06-12 22:15:57 +01002029 hi def link vimEscape Special
Doug Kearns9b171bd2025-04-10 19:59:22 +02002030 hi def link vimExFilter vimCommand
2031 hi def link vimExFilterBang vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002032 hi def link vimFBVar vimVar
2033 hi def link vimFgBgAttrib vimHiAttrib
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +01002034 hi def link vimFuncEcho vimCommand
dkearns1c97b5c2023-12-13 02:47:43 +11002035 hi def link vimFor vimCommand
Doug Kearns1aa287e2025-02-10 22:00:27 +01002036 hi def link vimForInContinue vimContinue
2037 hi def link vimForInContinueComment vimContinueComment
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002038 hi def link vimFTCmd vimCommand
2039 hi def link vimFTOption vimSynType
dkearns35e6f4c2024-03-22 06:41:10 +11002040 hi def link vimFuncBang vimBang
2041 hi def link vimFuncComment vimComment
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002042 hi def link vimFuncKey vimCommand
2043 hi def link vimFuncName Function
dkearns35e6f4c2024-03-22 06:41:10 +11002044 hi def link vimFuncMod Special
2045 hi def link vimFuncParam vimVar
2046 hi def link vimFuncParamEquals vimOper
Doug Kearns3dca5122025-03-09 16:30:28 +01002047 hi def link vimFuncScope vimVarScope
Doug Kearns1aa287e2025-02-10 22:00:27 +01002048 hi def link vimFuncSID vimNotation
Doug Kearns9b171bd2025-04-10 19:59:22 +02002049 hi def link vimGrep vimCommand
2050 hi def link vimGrepadd vimCommand
2051 hi def link vimGrepBang vimBang
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002052 hi def link vimGroupAdd vimSynOption
Doug Kearns0fab8912025-03-10 21:04:53 +01002053 hi def link vimGroupName Normal
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002054 hi def link vimGroupRem vimSynOption
2055 hi def link vimGroupSpecial Special
2056 hi def link vimGroup Type
Doug Kearns9b171bd2025-04-10 19:59:22 +02002057 hi def link vimHelpgrep vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002058 hi def link vimHiAttrib PreProc
dkearnsb614b282024-02-12 03:13:34 +11002059 hi def link vimHiBang vimBang
dkearns9530fe42024-03-19 05:19:51 +11002060 hi def link vimHiClear Type
2061 hi def link vimHiCtermColor Constant
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002062 hi def link vimHiCtermFgBg vimHiTerm
dkearns9530fe42024-03-19 05:19:51 +11002063 hi def link vimHiCtermfont vimHiTerm
2064 hi def link vimHiCtermul vimHiTerm
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002065 hi def link vimHiCTerm vimHiTerm
2066 hi def link vimHighlight vimCommand
2067 hi def link vimHiGroup vimGroupName
2068 hi def link vimHiGuiFgBg vimHiTerm
2069 hi def link vimHiGuiFont vimHiTerm
2070 hi def link vimHiGuiRgb vimNumber
2071 hi def link vimHiGui vimHiTerm
2072 hi def link vimHiNmbr Number
Doug Kearns0fab8912025-03-10 21:04:53 +01002073 hi def link vimHiNone vimGroup
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002074 hi def link vimHiStartStop vimHiTerm
2075 hi def link vimHiTerm Type
2076 hi def link vimHLGroup vimGroup
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002077 hi def link vimInsert vimString
dkearns04e53632024-04-11 06:18:37 +10002078 hi def link vim9KeymapLineComment vimKeymapLineComment
dkearns69866442023-11-22 05:43:40 +11002079 hi def link vimKeymapLineComment vimComment
2080 hi def link vimKeymapTailComment vimComment
Doug Kearns722fbd12025-03-28 19:36:37 +01002081 hi def link vimLambdaBrace Delimiter
Doug Kearns1aa287e2025-02-10 22:00:27 +01002082 hi def link vimLambdaOperator vimOper
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002083 hi def link vimLet vimCommand
Doug Kearnsa577e422025-05-17 16:29:13 +02002084 hi def link vimLetHeredoc vimString
2085 hi def link vimLetHeredocStart Special
2086 hi def link vimLetHeredocStop Special
Doug Kearns2f5a8c02025-04-05 15:55:36 +02002087 hi def link vimLetRegister vimRegister
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002088 hi def link vimLineComment vimComment
Doug Kearnsa577e422025-05-17 16:29:13 +02002089 hi def link vimLua vimCommand
Doug Kearns9b171bd2025-04-10 19:59:22 +02002090 hi def link vimMake vimCommand
2091 hi def link vimMakeadd vimCommand
2092 hi def link vimMakeBang vimBang
dkearnsb614b282024-02-12 03:13:34 +11002093 hi def link vimMapBang vimBang
Doug Kearns6bdfeb02025-03-07 18:49:11 +01002094 hi def link vimMapLeader vimBracket
2095 hi def link vimMapLeaderKey vimNotation
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002096 hi def link vimMapModKey vimFuncSID
2097 hi def link vimMapMod vimBracket
2098 hi def link vimMap vimCommand
2099 hi def link vimMark Number
2100 hi def link vimMarkNumber vimNumber
Doug Kearnse85fdc72024-07-07 20:45:37 +02002101 hi def link vimMatch vimCommand
2102 hi def link vimMatchGroup vimGroup
2103 hi def link vimMatchNone vimGroup
dkearnsb614b282024-02-12 03:13:34 +11002104 hi def link vimMenuBang vimBang
dkearns62b26042024-03-10 03:43:28 +11002105 hi def link vimMenuClear Special
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002106 hi def link vimMenuMod vimMapMod
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002107 hi def link vimMenuName PreProc
dkearns62b26042024-03-10 03:43:28 +11002108 hi def link vimMenu vimCommand
2109 hi def link vimMenuNotation vimNotation
2110 hi def link vimMenuPriority Number
2111 hi def link vimMenuStatus Special
2112 hi def link vimMenutranslateComment vimComment
Doug Kearns818c6412024-10-06 17:00:48 +02002113 hi def link vim9MethodName vimFuncName
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002114 hi def link vimMtchComment vimComment
Doug Kearnsa577e422025-05-17 16:29:13 +02002115 hi def link vimMzScheme vimCommand
2116 hi def link vimNonText NonText
Doug Kearnsbbe52522024-11-09 19:11:25 +01002117 hi def link vimNormal vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002118 hi def link vimNotation Special
2119 hi def link vimNotFunc vimCommand
2120 hi def link vimNotPatSep vimString
2121 hi def link vimNumber Number
2122 hi def link vimOperError Error
2123 hi def link vimOper Operator
Doug Kearns1aa287e2025-02-10 22:00:27 +01002124 hi def link vimOperContinue vimContinue
2125 hi def link vimOperContinueComment vimContinueComment
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002126 hi def link vimOption PreProc
Doug Kearns1aa287e2025-02-10 22:00:27 +01002127 hi def link vimOptionVar Identifier
Doug Kearns3dca5122025-03-09 16:30:28 +01002128 hi def link vimOptionVarName Identifier
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002129 hi def link vimParenSep Delimiter
Bram Moolenaard2855f52018-07-31 22:23:58 +02002130 hi def link vimPatSepErr vimError
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002131 hi def link vimPatSepR vimPatSep
2132 hi def link vimPatSep SpecialChar
2133 hi def link vimPatSepZone vimString
2134 hi def link vimPatSepZ vimPatSep
2135 hi def link vimPattern Type
Doug Kearnsa577e422025-05-17 16:29:13 +02002136 hi def link vimPerl vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002137 hi def link vimPlainMark vimMark
2138 hi def link vimPlainRegister vimRegister
Doug Kearnsa577e422025-05-17 16:29:13 +02002139 hi def link vimPython vimCommand
2140 hi def link vimPython3 vimCommand
2141 hi def link vimPythonX vimCommand
Doug Kearns695522d2025-01-10 20:02:17 +01002142 hi def link vimQuoteEscape vimEscape
Doug Kearns2f5a8c02025-04-05 15:55:36 +02002143 hi def link vimRedir vimCommand
2144 hi def link vimRedirBang vimBang
2145 hi def link vimRedirFileOperator vimOper
2146 hi def link vimRedirRegisterOperator vimOper
2147 hi def link vimRedirVariableOperator vimOper
2148 hi def link vimRedirEnd Special
2149 hi def link vimRedirRegister vimRegister
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002150 hi def link vimRegister SpecialChar
Doug Kearnsa577e422025-05-17 16:29:13 +02002151 hi def link vimRuby vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002152 hi def link vimScriptDelim Comment
Doug Kearnsa577e422025-05-17 16:29:13 +02002153 hi def link vimScriptHeredocStart vimLetHeredocStart
2154 hi def link vimScriptHeredocStop vimLetHeredocStop
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002155 hi def link vimSearch vimString
Doug Kearnsc273f1a2025-01-20 21:53:01 +01002156 hi def link vimSearchDelim Delimiter
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002157 hi def link vimSep Delimiter
Doug Kearnsddbb6fe2024-07-24 20:21:22 +02002158 hi def link vimSet vimCommand
2159 hi def link vimSetAll vimOption
2160 hi def link vimSetBang vimBang
Doug Kearns2a6be832025-04-03 21:39:24 +02002161 hi def link vimSetComment vimComment
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002162 hi def link vimSetMod vimOption
Doug Kearnsddbb6fe2024-07-24 20:21:22 +02002163 hi def link vimSetSep vimSep
Doug Kearnsddbb6fe2024-07-24 20:21:22 +02002164 hi def link vimSetTermcap vimOption
dkearnsae321b52024-06-15 23:06:17 +10002165 hi def link vimShebang PreProc
Doug Kearns262e25e2024-06-14 20:16:35 +02002166 hi def link vimSleep vimCommand
2167 hi def link vimSleepArg Constant
2168 hi def link vimSleepBang vimBang
Doug Kearns9b171bd2025-04-10 19:59:22 +02002169 hi def link vimSort vimCommand
2170 hi def link vimSortBang vimBang
2171 hi def link vimSortOptions Special
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002172 hi def link vimSpecFile Identifier
2173 hi def link vimSpecFileMod vimSpecFile
2174 hi def link vimSpecial Type
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002175 hi def link vimStringCont vimString
2176 hi def link vimString String
Bram Moolenaard2855f52018-07-31 22:23:58 +02002177 hi def link vimStringEnd vimString
thincacf8695d2024-01-28 18:57:23 +01002178 hi def link vimStringInterpolationBrace vimEscape
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002179 hi def link vimSubst1 vimSubst
2180 hi def link vimSubstDelim Delimiter
2181 hi def link vimSubstFlags Special
2182 hi def link vimSubstSubstr SpecialChar
2183 hi def link vimSubstTwoBS vimString
2184 hi def link vimSubst vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002185 hi def link vimSynCase Type
Doug Kearns0fab8912025-03-10 21:04:53 +01002186 hi def link vimSyncCcomment Type
dkearnsc79646d2024-01-05 08:58:48 +11002187 hi def link vimSynCchar vimSynOption
2188 hi def link vimSynCcharValue Character
Doug Kearns0fab8912025-03-10 21:04:53 +01002189 hi def link vimSyncClear Type
2190 hi def link vimSyncFromstart Type
2191 hi def link vimSyncGroup vimGroupName
2192 hi def link vimSyncGroupName vimGroupName
2193 hi def link vimSyncKey Type
2194 hi def link vimSyncLinebreak Type
2195 hi def link vimSyncLinecont Type
2196 hi def link vimSyncLines Type
2197 hi def link vimSyncMatch Type
2198 hi def link vimSyncNone Type
2199 hi def link vimSynConceal Type
2200 hi def link vimSynContains vimSynOption
2201 hi def link vimSyncRegion Type
2202 hi def link vimSynFoldlevel Type
2203 hi def link vimSynIskeyword Type
2204 hi def link vimSynIskeywordSep Delimiter
2205 hi def link vimSynKeyContainedin vimSynContains
2206 hi def link vimSynKeyOpt vimSynOption
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002207 hi def link vimSynMtchGrp vimSynOption
2208 hi def link vimSynMtchOpt vimSynOption
2209 hi def link vimSynNextgroup vimSynOption
2210 hi def link vimSynNotPatRange vimSynRegPat
2211 hi def link vimSynOption Special
2212 hi def link vimSynPatRange vimString
Doug Kearns0fab8912025-03-10 21:04:53 +01002213 hi def link vimSynReg Type
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002214 hi def link vimSynRegOpt vimSynOption
2215 hi def link vimSynRegPat vimString
Doug Kearns0fab8912025-03-10 21:04:53 +01002216 hi def link vimSynSpell Type
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002217 hi def link vimSyntax vimCommand
2218 hi def link vimSynType vimSpecial
Doug Kearnsa577e422025-05-17 16:29:13 +02002219 hi def link vimTcl vimCommand
dkearnsa3bddb72024-06-14 01:48:10 +10002220 hi def link vimThrow vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002221 hi def link vimTodo Todo
Bram Moolenaar4d8f4762021-06-27 15:18:56 +02002222 hi def link vimType Type
dkearnsf6869212023-12-11 01:53:24 +11002223 hi def link vimUnlet vimCommand
dkearnsb614b282024-02-12 03:13:34 +11002224 hi def link vimUnletBang vimBang
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002225 hi def link vimUnmap vimMap
Doug Kearns520a2c72025-04-08 20:50:00 +02002226 hi def link vimUserCmd vimCommand
Doug Kearns3c07eb02024-09-02 10:03:37 +02002227 hi def link vimUserCmdAttrAddr vimSpecial
Doug Kearns520a2c72025-04-08 20:50:00 +02002228 hi def link vimUserCmdAttrComplete vimSpecial
2229 hi def link vimUserCmdAttrCompleteFunc vimVar
Doug Kearns3c07eb02024-09-02 10:03:37 +02002230 hi def link vimUserCmdAttrNargs vimSpecial
2231 hi def link vimUserCmdAttrRange vimSpecial
2232 hi def link vimUserCmdAttrKey vimUserCmdAttr
2233 hi def link vimUserCmdAttr Special
2234 hi def link vimUserCmdAttrError Error
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002235 hi def link vimUserCmdError Error
Doug Kearns3c07eb02024-09-02 10:03:37 +02002236 hi def link vimUserCmdKey vimCommand
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002237 hi def link vimUserFunc Normal
Doug Kearns1aa287e2025-02-10 22:00:27 +01002238 hi def link vimVar Normal
Doug Kearns3dca5122025-03-09 16:30:28 +01002239 hi def link vimVarScope Identifier
Doug Kearns9b171bd2025-04-10 19:59:22 +02002240 hi def link vimVimgrep vimCommand
2241 hi def link vimVimgrepadd vimCommand
2242 hi def link vimVimgrepBang vimBang
2243 hi def link vimVimgrepFlags Special
Doug Kearns3dca5122025-03-09 16:30:28 +01002244 hi def link vimVimVar Identifier
2245 hi def link vimVimVarName Identifier
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002246 hi def link vimWarn WarningMsg
Doug Kearnsfa3b1042025-04-22 19:48:13 +02002247 hi def link vimWildcard Special
2248 hi def link vimWildcardBraceComma vimWildcard
2249 hi def link vimWildcardBracket vimWildcard
2250 hi def link vimWildcardBracketCaret vimWildcard
2251 hi def link vimWildcardBracketCharacter Normal
2252 hi def link vimWildcardBracketCharacter Normal
2253 hi def link vimWildcardBracketCharacterClass vimWildCard
2254 hi def link vimWildcardBracketCollatingSymbol vimWildCard
2255 hi def link vimWildcardBracketEnd vimWildcard
2256 hi def link vimWildcardBracketEquivalenceClass vimWildCard
2257 hi def link vimWildcardBracketEscape vimWildcard
2258 hi def link vimWildcardBracketHyphen vimWildcard
2259 hi def link vimWildcardBracketRightBracket vimWildcardBracketCharacter
2260 hi def link vimWildcardBracketStart vimWildcard
2261 hi def link vimWildcardEscape vimWildcard
2262 hi def link vimWildcardInterval vimWildcard
2263 hi def link vimWildcardQuestion vimWildcard
2264 hi def link vimWildcardStar vimWildcard
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002265
Doug Kearns818c6412024-10-06 17:00:48 +02002266 hi def link vim9Abstract vimCommand
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002267 hi def link vim9Boolean Boolean
Doug Kearns818c6412024-10-06 17:00:48 +02002268 hi def link vim9Class vimCommand
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002269 hi def link vim9Comment Comment
2270 hi def link vim9CommentError vimError
2271 hi def link vim9CommentTitle PreProc
Doug Kearns1aa287e2025-02-10 22:00:27 +01002272 hi def link vim9ConstructorDefParam vimVar
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002273 hi def link vim9Const vimCommand
Doug Kearns818c6412024-10-06 17:00:48 +02002274 hi def link vim9ContinueComment vimContinueComment
2275 hi def link vim9Enum vimCommand
Doug Kearns1c580192025-05-01 17:43:17 +02002276 hi def link vim9EnumImplementedInterfaceComment vim9Comment
2277 hi def link vim9EnumImplements vim9Implements
2278 hi def link vim9EnumNameComment vim9Comment
2279 hi def link vim9EnumNameContinue vimContinue
2280 hi def link vim9EnumNameContinueComment vim9Comment
2281 hi def link vim9EnumValueListCommaComment vim9Comment
Doug Kearns818c6412024-10-06 17:00:48 +02002282 hi def link vim9Export vimCommand
2283 hi def link vim9Extends Keyword
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002284 hi def link vim9Final vimCommand
2285 hi def link vim9For vimCommand
Doug Kearns1aa287e2025-02-10 22:00:27 +01002286 hi def link vim9ForInComment vim9Comment
Doug Kearns818c6412024-10-06 17:00:48 +02002287 hi def link vim9Implements Keyword
2288 hi def link vim9AbstractDef vimCommand
2289 hi def link vim9Interface vimCommand
Doug Kearns1aa287e2025-02-10 22:00:27 +01002290 hi def link vim9LambdaOperator vimOper
2291 hi def link vim9LambdaOperatorComment vim9Comment
Doug Kearns722fbd12025-03-28 19:36:37 +01002292 hi def link vim9LambdaParen vimParenSep
Doug Kearns1aa287e2025-02-10 22:00:27 +01002293 hi def link vim9LhsRegister vimLetRegister
2294 hi def link vim9LhsVariable vimVar
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002295 hi def link vim9LineComment vimComment
Doug Kearns818c6412024-10-06 17:00:48 +02002296 hi def link vim9MethodDef vimCommand
Doug Kearnsdd3f1c02025-03-17 20:27:13 +01002297 hi def link vim9MethodDefComment vimDefComment
Doug Kearns818c6412024-10-06 17:00:48 +02002298 hi def link vim9MethodNameError vimFunctionError
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002299 hi def link vim9Null Constant
Doug Kearns818c6412024-10-06 17:00:48 +02002300 hi def link vim9Public vimCommand
Doug Kearnsc273f1a2025-01-20 21:53:01 +01002301 hi def link vim9Search vimString
2302 hi def link vim9SearchDelim Delimiter
Doug Kearns818c6412024-10-06 17:00:48 +02002303 hi def link vim9Static vimCommand
2304 hi def link vim9Super Identifier
2305 hi def link vim9This Identifier
2306 hi def link vim9Type vimCommand
2307 hi def link vim9TypeEquals vimOper
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002308 hi def link vim9Variable vimVar
Doug Kearns818c6412024-10-06 17:00:48 +02002309 hi def link vim9Var vimCommand
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002310 hi def link vim9Vim9ScriptArg Special
Doug Kearns818c6412024-10-06 17:00:48 +02002311 hi def link vim9Vim9Script vimCommand
Doug Kearns025dc482025-02-23 15:48:52 +01002312
2313 hi def link vimCompilerSet vimCommand
2314 hi def link vimSynMenu vimCommand
2315 hi def link vimSynMenuPath vimMenuName
Bram Moolenaarf37506f2016-08-31 22:22:10 +02002316endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002317
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00002318" Current Syntax Variable: {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +00002319let b:current_syntax = "vim"
Bram Moolenaar6be7f872012-01-20 21:08:56 +01002320
2321" ---------------------------------------------------------------------
2322" Cleanup: {{{1
Doug Kearnsd65e58f2024-07-17 19:34:14 +02002323delc Vim9
2324delc VimL
Bram Moolenaara0f849e2015-10-30 14:37:44 +01002325delc VimFolda
Doug Kearns818c6412024-10-06 17:00:48 +02002326delc VimFoldc
2327delc VimFolde
Bram Moolenaara0f849e2015-10-30 14:37:44 +01002328delc VimFoldf
Doug Kearnsce064932024-04-13 18:24:01 +02002329delc VimFoldh
2330delc VimFoldH
Doug Kearns818c6412024-10-06 17:00:48 +02002331delc VimFoldi
Bram Moolenaara0f849e2015-10-30 14:37:44 +01002332delc VimFoldl
2333delc VimFoldm
2334delc VimFoldp
2335delc VimFoldP
2336delc VimFoldr
2337delc VimFoldt
Bram Moolenaar6be7f872012-01-20 21:08:56 +01002338let &cpo = s:keepcpo
dkearns04e53632024-04-11 06:18:37 +10002339unlet s:keepcpo s:vim9script
dkearns5d67aef2024-03-10 04:01:22 +11002340" vim:ts=18 fdm=marker ft=vim