Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
dkearns | 982e191 | 2024-03-28 20:06:03 +1100 | [diff] [blame] | 2 | " Language: Vim script |
| 3 | " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> |
| 4 | " Doug Kearns <dougkearns@gmail.com> |
Doug Kearns | 1c58019 | 2025-05-01 17:43:17 +0200 | [diff] [blame] | 5 | " Last Change: 2025 May 01 |
Christian Brabandt | f9ca139 | 2024-02-19 20:37:11 +0100 | [diff] [blame] | 6 | " Former Maintainer: Charles E. Campbell |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 7 | |
| 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 Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 12 | " Quit when a syntax file was already loaded {{{1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 13 | if exists("b:current_syntax") |
| 14 | finish |
| 15 | endif |
Bram Moolenaar | 113cb51 | 2021-11-07 20:27:04 +0000 | [diff] [blame] | 16 | let s:keepcpo= &cpo |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 17 | set cpo&vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 18 | |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 19 | " Feature testing {{{1 |
| 20 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 21 | let s:vim9script = "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>' |
| 22 | |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 23 | function s:has(feature) |
| 24 | return has(a:feature) || index(get(g:, "vimsyn_vim_features", []), a:feature) != -1 |
| 25 | endfunction |
| 26 | |
| 27 | " Automatically generated keyword lists: {{{1 |
| 28 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 29 | " vimTodo: contains common special-notices for comments {{{2 |
| 30 | " Use the vimCommentGroup cluster to add your own. |
Bram Moolenaar | e271909 | 2015-01-10 15:09:25 +0100 | [diff] [blame] | 31 | syn keyword vimTodo contained COMBAK FIXME TODO XXX |
Bram Moolenaar | 217ad92 | 2005-03-20 22:37:15 +0000 | [diff] [blame] | 32 | syn cluster vimCommentGroup contains=vimTodo,@Spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 33 | |
| 34 | " regular vim commands {{{2 |
Doug Kearns | 1718e7d | 2025-01-08 18:20:47 +0100 | [diff] [blame] | 35 | " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang' |
| 36 | syn 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 Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 37 | syn 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 |
| 38 | syn 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] lua luad[o] luaf[ile] lw[indow] ls m[ove] ma[rk] marks menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] 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] nextgroup=vimBang |
| 39 | syn keyword vimCommand contained p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] pe[rl] perld[o] 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] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redr[aw] redraws[tatus] redrawt[abline] 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] nextgroup=vimBang |
| 40 | syn keyword vimCommand contained 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] 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] tcl tcld[o] tclf[ile] 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] nextgroup=vimBang |
| 41 | syn keyword vimCommand contained 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] 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-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 42 | |
Aliaksei Budavei | dfcef89 | 2024-02-18 21:02:14 +0300 | [diff] [blame] | 43 | " Lower priority for _new_ to distinguish constructors from the command. |
| 44 | syn match vimCommand contained "\<new\>(\@!" |
Bram Moolenaar | e271909 | 2015-01-10 15:09:25 +0100 | [diff] [blame] | 45 | syn match vimCommand contained "\<z[-+^.=]\=\>" |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 46 | syn 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 47 | |
| 48 | " vimOptions are caught only when contained in a vimSet {{{2 |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 49 | " GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' |
64-bitman | 88d41ab | 2025-04-06 17:20:39 +0200 | [diff] [blame] | 50 | syn 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 |
glepnir | f31cfa2 | 2025-03-06 21:59:13 +0100 | [diff] [blame] | 51 | syn 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 |
| 52 | syn 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 Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 53 | syn 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 |
| 54 | syn 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 |
| 55 | syn 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 ss sidescroll siso sidescrolloff skipwhite nextgroup=vimSetEqual,vimSetMod |
| 56 | syn 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 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 tm timeoutlen title titlelen skipwhite nextgroup=vimSetEqual,vimSetMod |
| 57 | syn keyword vimOption contained 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 wb writebackup wd writedelay skipwhite nextgroup=vimSetEqual,vimSetMod |
| 58 | syn keyword vimOption contained xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 59 | |
| 60 | " vimOptions: These are the turn-off setting variants {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 61 | " GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR='' |
| 62 | syn 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 |
| 63 | syn 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 |
dkearns | 691aee8 | 2024-03-04 05:02:47 +1100 | [diff] [blame] | 64 | syn 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 |
| 65 | syn keyword vimOption contained nowb nowritebackup noxtermcodes |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 66 | |
| 67 | " vimOptions: These are the invertible variants {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 68 | " GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR='' |
| 69 | syn 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 |
| 70 | syn 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 |
| 71 | syn 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 |
dkearns | 691aee8 | 2024-03-04 05:02:47 +1100 | [diff] [blame] | 72 | syn 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 73 | " termcap codes (which can also be set) {{{2 |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 74 | " GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' |
| 75 | syn 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-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 76 | " term key codes |
| 77 | syn 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 Moolenaar | b0d45e7 | 2017-11-05 18:19:24 +0100 | [diff] [blame] | 78 | syn match vimOption contained "t_%1" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 79 | syn match vimOption contained "t_#2" |
| 80 | syn match vimOption contained "t_#4" |
Bram Moolenaar | 6d5ad4c | 2016-10-27 17:00:16 +0200 | [diff] [blame] | 81 | syn match vimOption contained "t_@7" |
Bram Moolenaar | b0d45e7 | 2017-11-05 18:19:24 +0100 | [diff] [blame] | 82 | syn match vimOption contained "t_*7" |
| 83 | syn match vimOption contained "t_&8" |
| 84 | syn match vimOption contained "t_%i" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 85 | syn match vimOption contained "t_k;" |
| 86 | |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 87 | " vimOptions: These are the variable names {{{2 |
| 88 | " GEN_SYN_VIM: vimOption normal variable, START_STR='syn keyword vimOptionVarName contained', END_STR='' |
64-bitman | 88d41ab | 2025-04-06 17:20:39 +0200 | [diff] [blame] | 89 | syn 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 |
| 90 | syn 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 |
| 91 | syn 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 Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 92 | syn 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 |
| 93 | syn 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 |
| 94 | syn 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 |
| 95 | syn keyword vimOptionVarName contained stal showtabline 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 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 |
| 96 | syn keyword vimOptionVarName contained 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 winptydll wiw winwidth wrap wm wrapmargin |
| 97 | syn keyword vimOptionVarName contained ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 98 | " GEN_SYN_VIM: vimOption term output code variable, START_STR='syn keyword vimOptionVarName contained', END_STR='' |
| 99 | syn 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 |
| 100 | syn 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 |
| 101 | syn match vimOptionVarName contained "t_%1" |
| 102 | syn match vimOptionVarName contained "t_#2" |
| 103 | syn match vimOptionVarName contained "t_#4" |
| 104 | syn match vimOptionVarName contained "t_@7" |
| 105 | syn match vimOptionVarName contained "t_*7" |
| 106 | syn match vimOptionVarName contained "t_&8" |
| 107 | syn match vimOptionVarName contained "t_%i" |
| 108 | syn match vimOptionVarName contained "t_k;" |
| 109 | |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 110 | " unsupported settings: some were supported by vi but don't do anything in vim {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 111 | " GEN_SYN_VIM: Missing vimOption, START_STR='syn keyword vimErrSetting contained', END_STR='' |
| 112 | syn 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 |
| 113 | syn 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 |
| 114 | syn 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 115 | |
Bram Moolenaar | 80a94a5 | 2006-02-23 21:26:58 +0000 | [diff] [blame] | 116 | " AutoCmd Events {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 117 | syn case ignore |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 118 | " GEN_SYN_VIM: vimAutoEvent, START_STR='syn keyword vimAutoEvent contained', END_STR='skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern' |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 119 | syn 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 |
| 120 | syn 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 |
| 121 | syn keyword vimAutoEvent contained WinScrolled skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 122 | |
| 123 | syn keyword vimAutoEvent contained User skipwhite nextgroup=vimUserAutoEvent |
| 124 | syn match vimUserAutoEvent contained "\<\h\w*\>" skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 125 | |
| 126 | " Highlight commonly used Groupnames {{{2 |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 127 | syn 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 128 | |
| 129 | " Default highlighting groups {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 130 | " GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR='' |
Yee Cheng Chin | 9943d47 | 2025-03-26 19:41:02 +0100 | [diff] [blame] | 131 | syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText DiffTextAdd PmenuSbar TabLineSel TabLineFill 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 LineNrAbove LineNrBelow |
Christian Brabandt | 393708c | 2024-05-27 15:50:07 +0200 | [diff] [blame] | 132 | syn match vimHLGroup contained "\<Conceal\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 133 | syn case match |
| 134 | |
| 135 | " Function Names {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 136 | " GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR='' |
Doug Kearns | 8dec6c2 | 2025-01-19 14:02:06 +0100 | [diff] [blame] | 137 | syn 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 Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 138 | syn 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 |
| 139 | syn 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 |
| 140 | syn 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 |
| 141 | syn 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 |
| 142 | syn 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 |
| 143 | syn 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 |
| 144 | syn 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 |
| 145 | syn 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 Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 146 | " Predefined variable names {{{2 |
| 147 | " GEN_SYN_VIM: vimVarName, START_STR='syn keyword vimVimVarName contained', END_STR='' |
| 148 | syn 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 Lakshmanan | 038be27 | 2025-03-26 18:46:21 +0100 | [diff] [blame] | 149 | syn 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 150 | |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 151 | "--- syntax here and above generated by runtime/syntax/generator/gen_syntax_vim.vim --- |
| 152 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 153 | " Special Vim Highlighting (not automatic) {{{1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 154 | |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 155 | " Neovim keyword list additions {{{2 |
| 156 | |
| 157 | if s:has("nvim") |
| 158 | syn keyword vimOptionVarName contained channel inccommand mousescroll pumblend redrawdebug scrollback shada shadafile statuscolumn termpastefilter termsync winbar winblend winhighlight |
| 159 | syn keyword vimVimVarName contained lua msgpack_types relnum stderr termrequest virtnum |
| 160 | endif |
| 161 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 162 | " Set up commands for this syntax highlighting file {{{2 |
| 163 | |
| 164 | com! -nargs=* Vim9 execute <q-args> s:vim9script ? "" : "contained" |
| 165 | com! -nargs=* VimL execute <q-args> s:vim9script ? "contained" : "" |
| 166 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 167 | if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[acefhiHlmpPrt]' |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 168 | if g:vimsyn_folding =~# 'a' |
| 169 | com! -nargs=* VimFolda <args> fold |
| 170 | else |
| 171 | com! -nargs=* VimFolda <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 172 | endif |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 173 | if g:vimsyn_folding =~# 'c' |
| 174 | com! -nargs=* VimFoldc <args> fold |
| 175 | else |
| 176 | com! -nargs=* VimFoldc <args> |
| 177 | endif |
| 178 | if g:vimsyn_folding =~# 'e' |
| 179 | com! -nargs=* VimFolde <args> fold |
| 180 | else |
| 181 | com! -nargs=* VimFolde <args> |
| 182 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 183 | if g:vimsyn_folding =~# 'f' |
| 184 | com! -nargs=* VimFoldf <args> fold |
| 185 | else |
| 186 | com! -nargs=* VimFoldf <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 187 | endif |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 188 | if g:vimsyn_folding =~# 'h' |
| 189 | com! -nargs=* VimFoldh <args> fold |
| 190 | else |
| 191 | com! -nargs=* VimFoldh <args> |
| 192 | endif |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 193 | if g:vimsyn_folding =~# 'H' |
| 194 | com! -nargs=* VimFoldH <args> fold |
| 195 | else |
| 196 | com! -nargs=* VimFoldH <args> |
| 197 | endif |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 198 | if g:vimsyn_folding =~# 'i' |
| 199 | com! -nargs=* VimFoldi <args> fold |
| 200 | else |
| 201 | com! -nargs=* VimFoldi <args> |
| 202 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 203 | if g:vimsyn_folding =~# 'l' |
| 204 | com! -nargs=* VimFoldl <args> fold |
| 205 | else |
| 206 | com! -nargs=* VimFoldl <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 207 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 208 | if g:vimsyn_folding =~# 'm' |
| 209 | com! -nargs=* VimFoldm <args> fold |
| 210 | else |
| 211 | com! -nargs=* VimFoldm <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 212 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 213 | if g:vimsyn_folding =~# 'p' |
| 214 | com! -nargs=* VimFoldp <args> fold |
| 215 | else |
| 216 | com! -nargs=* VimFoldp <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 217 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 218 | if g:vimsyn_folding =~# 'P' |
| 219 | com! -nargs=* VimFoldP <args> fold |
| 220 | else |
| 221 | com! -nargs=* VimFoldP <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 222 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 223 | if g:vimsyn_folding =~# 'r' |
| 224 | com! -nargs=* VimFoldr <args> fold |
| 225 | else |
| 226 | com! -nargs=* VimFoldr <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 227 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 228 | if g:vimsyn_folding =~# 't' |
| 229 | com! -nargs=* VimFoldt <args> fold |
| 230 | else |
| 231 | com! -nargs=* VimFoldt <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 232 | endif |
| 233 | else |
| 234 | com! -nargs=* VimFolda <args> |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 235 | com! -nargs=* VimFoldc <args> |
| 236 | com! -nargs=* VimFolde <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 237 | com! -nargs=* VimFoldf <args> |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 238 | com! -nargs=* VimFoldi <args> |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 239 | com! -nargs=* VimFoldh <args> |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 240 | com! -nargs=* VimFoldH <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 241 | com! -nargs=* VimFoldl <args> |
| 242 | com! -nargs=* VimFoldm <args> |
| 243 | com! -nargs=* VimFoldp <args> |
| 244 | com! -nargs=* VimFoldP <args> |
| 245 | com! -nargs=* VimFoldr <args> |
| 246 | com! -nargs=* VimFoldt <args> |
| 247 | endif |
| 248 | |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 249 | " Deprecated variable options {{{2 |
| 250 | if exists("g:vim_minlines") |
| 251 | let g:vimsyn_minlines= g:vim_minlines |
| 252 | endif |
| 253 | if exists("g:vim_maxlines") |
| 254 | let g:vimsyn_maxlines= g:vim_maxlines |
| 255 | endif |
| 256 | if exists("g:vimsyntax_noerror") |
| 257 | let g:vimsyn_noerror= g:vimsyntax_noerror |
| 258 | endif |
| 259 | |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 260 | " Variable options {{{2 |
| 261 | if exists("g:vim_maxlines") |
| 262 | let s:vimsyn_maxlines= g:vim_maxlines |
| 263 | else |
| 264 | let s:vimsyn_maxlines= 60 |
| 265 | endif |
| 266 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 267 | " Nulls {{{2 |
| 268 | " ===== |
| 269 | Vim9 syn keyword vim9Null null null_blob null_channel null_class null_dict null_function null_job null_list null_object null_partial null_string |
| 270 | |
| 271 | " Booleans {{{2 |
| 272 | " ======== |
| 273 | Vim9 syn keyword vim9Boolean true false |
| 274 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 275 | " Numbers {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 276 | " ======= |
dkearns | 5cd86c6 | 2024-03-12 07:40:58 +1100 | [diff] [blame] | 277 | syn case ignore |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 278 | syn match vimNumber '\<\d\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript |
| 279 | syn match vimNumber '\<\d\+\.\d\+\%(e[+-]\=\d\+\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment |
| 280 | syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript |
| 281 | syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript |
| 282 | syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript |
Doug Kearns | 8dec6c2 | 2025-01-19 14:02:06 +0100 | [diff] [blame] | 283 | syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 284 | syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript |
dkearns | 5cd86c6 | 2024-03-12 07:40:58 +1100 | [diff] [blame] | 285 | syn case match |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 286 | |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 287 | " All vimCommands are contained by vimIsCommand. {{{2 |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 288 | syn 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 |
h-east | 6139766 | 2025-01-03 17:32:54 +0100 | [diff] [blame] | 289 | syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var |
Doug Kearns | 60bd140 | 2025-02-27 19:15:20 +0100 | [diff] [blame] | 290 | syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc |
| 291 | syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1 |
Doug Kearns | 4a530a6 | 2025-02-03 18:59:09 +0100 | [diff] [blame] | 292 | syn match vimCount contained "\d\+" |
Doug Kearns | 1718e7d | 2025-01-08 18:20:47 +0100 | [diff] [blame] | 293 | syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" nextgroup=vimBang contains=vimCommand |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 294 | syn match vimBang contained "!" |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 295 | syn match vimWhitespace contained "\s\+" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 296 | |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 297 | syn region vimSubscript contained matchgroup=vimSubscriptBracket start="\[" end="]" nextgroup=vimSubscript contains=@vimExprList |
| 298 | |
| 299 | syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vim9Super,vim9This |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 300 | syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vimVarScope |
| 301 | syn match vimVar "\<a:\%(000\|1\=[0-9]\|20\)\>" nextgroup=vimSubscript contains=vimVarScope |
| 302 | syn match vimFBVar contained "\<[bwglsta]:\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vimVarScope |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 303 | |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 304 | " match the scope prefix independently of the retrofitted scope dictionary |
| 305 | syn match vimVarScope contained "\<[bwglstav]:" |
| 306 | syn match vimVimVar contained "\<[bwglstav]:\%(\h\|\d\)\@!" nextgroup=vimSubscript |
| 307 | |
| 308 | syn match vimVarNameError contained "\<\h\w*\>" |
| 309 | syn match vimVimVar "\<v:" nextgroup=vimSubscript,vimVimVarName,vimVarNameError |
| 310 | syn match vimOptionVar "&\%([lg]:\)\=" nextgroup=vimSubscript,vimOptionVarName,vimVarNameError |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 311 | syn cluster vimSpecialVar contains=vimEnvvar,vimLetRegister,vimOptionVar,vimVimVar |
| 312 | |
| 313 | Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\==" |
| 314 | Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.=" |
| 315 | Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+=<<" |
| 316 | Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s*->" contains=vim9Super,vim9This |
| 317 | Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\[" nextgroup=vimSubscript |
| 318 | Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\." nextgroup=vimOper contains=vim9Super,vim9This |
| 319 | |
| 320 | Vim9 syn match vim9LhsVariableList "\[\_[^]]\+]\ze\s\+[-+/*%]\==" contains=vimVar,@vimSpecialVar |
| 321 | Vim9 syn match vim9LhsVariableList "\[\_[^]]\+]\ze\s\+\.\.=" contains=vimVar,@vimSpecialVar |
| 322 | |
| 323 | Vim9 syn match vim9LhsRegister "@["0-9\-a-zA-Z#=*+_/]\ze\s\+\%(\.\.\)\==" |
| 324 | |
| 325 | syn cluster vimExprList contains=@vimSpecialVar,vimFunc,vimNumber,vimOper,vimOperParen,vimLambda,vimString,vimVar,@vim9ExprList |
| 326 | syn cluster vim9ExprList contains=vim9Boolean,vim9LambdaParams,vim9Null |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 327 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 328 | " Insertions And Appends: insert append {{{2 |
Bram Moolenaar | 519cc55 | 2021-11-16 19:18:26 +0000 | [diff] [blame] | 329 | " (buftype != nofile test avoids having append, change, insert show up in the command window) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 330 | " ======================= |
Bram Moolenaar | 519cc55 | 2021-11-16 19:18:26 +0000 | [diff] [blame] | 331 | if &buftype != 'nofile' |
dkearns | 4ba70ca | 2024-04-15 04:32:56 +1000 | [diff] [blame] | 332 | syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$" extend |
| 333 | syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$" extend |
| 334 | syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$" extend |
Bram Moolenaar | 519cc55 | 2021-11-16 19:18:26 +0000 | [diff] [blame] | 335 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 336 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 337 | " Behave! {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 338 | " ======= |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 339 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror") |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 340 | syn match vimBehaveError contained "[^ ]\+" |
| 341 | endif |
Doug Kearns | fe6d5b0 | 2024-02-14 21:17:43 +0100 | [diff] [blame] | 342 | syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vimBehaveError skipwhite |
| 343 | syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite |
| 344 | syn keyword vimBehaveModel contained mswin xterm |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 345 | |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 346 | " Call {{{2 |
| 347 | " ==== |
| 348 | syn match vimCall "\<call\=\>" skipwhite nextgroup=vimFunc |
| 349 | |
Doug Kearns | a9c0642 | 2025-02-12 20:44:17 +0100 | [diff] [blame] | 350 | " Debuggreedy {{{2 |
Doug Kearns | 4a530a6 | 2025-02-03 18:59:09 +0100 | [diff] [blame] | 351 | " =========== |
| 352 | " TODO: special-cased until generalised range/count support is implemented |
| 353 | syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount |
| 354 | |
dkearns | a3bddb7 | 2024-06-14 01:48:10 +1000 | [diff] [blame] | 355 | " Exception Handling {{{2 |
| 356 | syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList |
| 357 | syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern |
| 358 | syn region vimCatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline |
| 359 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 360 | " Export {{{2 |
| 361 | " ====== |
| 362 | if s:vim9script |
| 363 | syn keyword vim9Export export skipwhite nextgroup=vim9Abstract,vim9ClassBody,vim9Const,vim9Def,vim9EnumBody,vim9Final,vim9InterfaceBody,vim9Type,vim9Var |
| 364 | endif |
| 365 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 366 | " Filetypes {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 367 | " ========= |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 368 | syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 369 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError") |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 370 | syn match vimFTError contained "\I\i*" |
| 371 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 372 | syn keyword vimFTCmd contained filet[ype] |
| 373 | syn keyword vimFTOption contained detect indent off on plugin |
| 374 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 375 | " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 376 | " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 377 | syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimContinue |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 378 | |
| 379 | " define |
| 380 | VimFolda syn region vimAugroup |
| 381 | \ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" |
| 382 | \ matchgroup=vimAugroupKey |
| 383 | \ end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" |
| 384 | \ skipwhite nextgroup=vimAugroupEnd |
| 385 | \ contains=vimAutocmd,@vimAugroupList,vimAugroupkey |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 386 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror") |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 387 | syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 388 | endif |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 389 | |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 390 | " TODO: Vim9 comment |
| 391 | syn match vimAugroupName contained "\%(\\["|[:space:]]\|[^"|[:space:]]\)\+" |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 392 | \ skipwhite nextgroup=vimCmdSep,vimComment |
| 393 | syn match vimAugroupEnd contained "\c\<END\>" skipwhite nextgroup=vimCmdSep,vimComment |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 394 | syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAugroupName |
| 395 | syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAugroupName,vimAugroupEnd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 396 | |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 397 | " remove |
| 398 | syn match vimAugroup "\<aug\%[roup]!" skipwhite nextgroup=vimAugroupName contains=vimAugroupKey,vimAugroupBang |
| 399 | |
| 400 | " list |
| 401 | VimL syn match vimAugroup "\<aug\%[roup]\>\ze\s*\%(["|]\|$\)" skipwhite nextgroup=vimCmdSep,vimComment contains=vimAugroupKey |
| 402 | Vim9 syn match vimAugroup "\<aug\%[roup]\>\ze\s*\%([#|]\|$\)" skipwhite nextgroup=vimCmdSep,vim9Comment contains=vimAugroupKey |
| 403 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 404 | " Operators: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 405 | " ========= |
Doug Kearns | b9ffbf5 | 2025-04-27 19:17:06 +0200 | [diff] [blame] | 406 | syn cluster vimOperGroup contains=@vimContinue,@vimExprList,vim9Comment,vim9LineComment,vimContinueString |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 407 | syn match vimOper "\a\@<!!" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile |
| 408 | syn match vimOper "||\|&&\|[-+*/%.]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 409 | syn match vimOper "?" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString |
Doug Kearns | c273f1a | 2025-01-20 21:53:01 +0100 | [diff] [blame] | 410 | " distinguish ternary : from ex-colon |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 411 | syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString |
| 412 | syn match vimOper "??" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString |
| 413 | syn match vimOper "=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile |
| 414 | syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile |
| 415 | syn match vimOper "\<is\%(not\)\=\>" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile |
| 416 | syn match vimOper "\<is\%(not\)\=[?#]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 417 | syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup nextgroup=vimSubscript |
| 418 | syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimSubscript,vimVar |
| 419 | syn region vimOperParen contained matchgroup=vimSep start="\[" end="]" contains=@vimOperGroup nextgroup=vimSubscript,vimVar |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 420 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 421 | syn match vimOperError ")" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 422 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 423 | |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 424 | syn match vimOperContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList contains=vimWhitespace |
| 425 | syn match vimOperContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList contains=vimWhitespace |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 426 | syn cluster vimOperContinue contains=vimOperContinue,vimOperContinueComment |
| 427 | |
| 428 | " Lambda Expressions: {{{2 |
| 429 | " ================== |
| 430 | syn match vimLambdaOperator contained "->" skipwhite nextgroup=@vimExprList |
Doug Kearns | 722fbd1 | 2025-03-28 19:36:37 +0100 | [diff] [blame] | 431 | syn region vimLambda contained |
| 432 | \ matchgroup=vimLambdaBrace |
| 433 | \ start=+{\ze[[:space:][:alnum:]_.,]*\%(\n\s*\%(\\[[:space:][:alnum:]_.,]*\|"\\ .*\)\)*->+ |
| 434 | \ skip=+\n\s*\%(\\\|"\\ \)+ |
| 435 | \ end="}" end="$" |
| 436 | \ contains=@vimContinue,@vimExprList,vimLambdaParams |
| 437 | syn match vimLambdaParams contained "\%({\n\=\)\@1<=\_.\{-}\%(->\)\@=" nextgroup=vimLambdaOperator contains=@vimContinue,vimFuncParam |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 438 | |
Doug Kearns | 722fbd1 | 2025-03-28 19:36:37 +0100 | [diff] [blame] | 439 | syn match vim9LambdaOperator contained "=>" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment |
| 440 | syn match vim9LambdaParen contained "[()]" |
| 441 | syn match vim9LambdaParams contained |
| 442 | \ "(\%(\<func(\|[^(]\)*\%(\n\s*\\\%(\<func(\|[^(]\)*\|\n\s*#\\ .*\)*\ze\s\+=>" |
| 443 | \ skipwhite nextgroup=vim9LambdaOperator |
| 444 | \ contains=@vim9Continue,vimDefParam,vim9LambdaParen,vim9LambdaReturnType |
| 445 | syn region vim9LambdaReturnType contained start=")\@<=:\s" end="\ze\s*#" end="\ze\s*=>" contains=@vim9Continue,@vimType transparent |
| 446 | syn region vim9LambdaBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 447 | |
| 448 | syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment |
| 449 | |
dkearns | 4ba70ca | 2024-04-15 04:32:56 +1000 | [diff] [blame] | 450 | " Functions: Tag is provided for those who wish to highlight tagged functions {{{2 |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 451 | " ========= |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 452 | syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncScope,vimFuncSID,Tag |
| 453 | syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncScope,vimFuncSID,Tag |
dkearns | 4ba70ca | 2024-04-15 04:32:56 +1000 | [diff] [blame] | 454 | |
Doug Kearns | 68ba6c2 | 2025-02-16 16:40:12 +0100 | [diff] [blame] | 455 | syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 456 | syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimInsert,vimConst,vimLet,vimSearch |
| 457 | syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Block,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9LhsVariable,vim9LhsVariableList,vim9LhsRegister,vim9Search,@vimSpecialVar |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 458 | |
| 459 | syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList |
| 460 | syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey |
| 461 | syn match vimDef "\<def\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimDefKey |
| 462 | |
| 463 | syn match vimFunction "\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimFuncList skipwhite nextgroup=vimFuncParams |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 464 | syn match vimDef "\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 465 | |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 466 | syn region vimFuncComment contained |
| 467 | \ start=+".*+ |
| 468 | \ skip=+\n\s*\\\|\n\s*"\\ + |
| 469 | \ end="$" |
| 470 | \ skipwhite skipempty nextgroup=vimFuncBody,vimEndfunction |
| 471 | syn region vimDefComment contained |
| 472 | \ start="#.*" |
| 473 | \ skip=+\n\s*\\\|\n\s*#\\ + |
| 474 | \ end="$" |
| 475 | \ skipwhite skipempty nextgroup=vimDefBody,vimEnddef |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 476 | |
| 477 | syn match vimFuncBang contained "!" |
| 478 | syn match vimFuncSID contained "\c<sid>" |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 479 | syn match vimFuncScope contained "\<[sg]:" |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 480 | syn keyword vimFuncKey contained fu[nction] |
| 481 | syn keyword vimDefKey contained def |
| 482 | |
Doug Kearns | 9b67a2e | 2024-12-26 10:13:45 +0100 | [diff] [blame] | 483 | syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,vimOperParen,@vimContinue |
| 484 | syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals,vimOperParen |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 485 | syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals |
| 486 | syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals |
| 487 | |
Doug Kearns | 35699f1 | 2024-09-19 19:51:59 +0200 | [diff] [blame] | 488 | syn match vimFuncParamEquals contained "=" skipwhite nextgroup=@vimExprList |
| 489 | syn match vimFuncMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 490 | |
Doug Kearns | 35699f1 | 2024-09-19 19:51:59 +0200 | [diff] [blame] | 491 | syn region vimFuncBody contained start="^." matchgroup=vimCmdSep start="|" matchgroup=vimCommand end="\<endfu\%[nction]\>" contains=@vimFuncBodyList skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError |
| 492 | syn region vimDefBody contained start="^." matchgroup=vimCmdSep start="|" matchgroup=vimCommand end="\<enddef\>" contains=@vimDefBodyList skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 493 | |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 494 | syn match vimEndfunction "\<endf\%[unction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError |
| 495 | syn match vimEnddef "\<enddef\>" skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 496 | |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 497 | if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 498 | syn region vimFuncFold start="\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\<endf\%[unction]\>" contains=vimFunction fold keepend extend transparent |
| 499 | syn region vimDefFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="\<enddef\>" contains=vimDef fold keepend extend transparent |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 500 | endif |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 501 | |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 502 | " Types: {{{2 |
| 503 | " ===== |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 504 | |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 505 | syn region vimReturnType contained |
| 506 | \ start=":\%(\s\|\n\)\@=" |
| 507 | \ skip=+\n\s*\\\|\n\s*#\\ \|^\s*#\\ + |
| 508 | \ end="$" |
| 509 | \ matchgroup=vim9Comment |
| 510 | "\ allow for legacy script tail comment error |
| 511 | \ end="\ze[#"]" |
| 512 | \ skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimCommentError |
| 513 | \ contains=@vim9Continue,@vimType |
| 514 | \ transparent |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 515 | syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType contains=vimTypeSep |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 516 | |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 517 | syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 518 | syn keyword vimType contained any blob bool channel float job number string void |
Doug Kearns | 722fbd1 | 2025-03-28 19:36:37 +0100 | [diff] [blame] | 519 | syn match vimType contained "\<\%(func\)\>" |
| 520 | syn region vimCompoundType contained matchgroup=vimType start="\<func(" end=")" nextgroup=vimTypeSep contains=@vim9Continue,@vimType transparent |
| 521 | syn region vimCompoundType contained matchgroup=vimType start="\<tuple<" end=">" contains=@vim9Continue,@vimType transparent |
| 522 | syn region vimCompoundType contained matchgroup=vimType start="\<\%(list\|dict\)<" end=">" contains=@vimType oneline transparent |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 523 | syn match vimUserType contained "\<\%(\h\w*\.\)*\u\w*\>" |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 524 | |
| 525 | syn cluster vimType contains=vimType,vimCompoundType,vimUserType |
Bram Moolenaar | 4d8f476 | 2021-06-27 15:18:56 +0200 | [diff] [blame] | 526 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 527 | " Classes, Enums And Interfaces: {{{2 |
| 528 | " ============================= |
| 529 | |
| 530 | if s:vim9script |
Doug Kearns | 1c58019 | 2025-05-01 17:43:17 +0200 | [diff] [blame] | 531 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 532 | " Methods {{{3 |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 533 | syn match vim9MethodDef contained "\<def\>" skipwhite nextgroup=vim9MethodDefName,vim9ConstructorDefName |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 534 | syn match vim9MethodDefName contained "\<\h\w*\>" nextgroup=vim9MethodDefParams contains=@vim9MethodName |
| 535 | syn region vim9MethodDefParams contained |
| 536 | \ matchgroup=Delimiter start="(" end=")" |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 537 | \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 538 | \ contains=vimDefParam,vim9Comment,vimFuncParamEquals |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 539 | |
Doug Kearns | adb703e | 2025-03-23 16:14:20 +0100 | [diff] [blame] | 540 | syn match vim9ConstructorDefName contained "\<_\=new\w*\>" |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 541 | \ nextgroup=vim9ConstructorDefParams |
| 542 | \ contains=@vim9MethodName |
| 543 | syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>" |
| 544 | \ skipwhite nextgroup=vimParamType,vimFuncParamEquals |
| 545 | \ contains=vim9This,vimOper |
| 546 | syn region vim9ConstructorDefParams contained |
| 547 | \ matchgroup=Delimiter start="(" end=")" |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 548 | \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vimCommentError |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 549 | \ contains=vim9ConstructorDefParam,vim9Comment,vimFuncParamEquals |
| 550 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 551 | syn region vim9MethodDefReturnType contained |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 552 | \ start=":\%(\s\|\n\)\@=" |
| 553 | \ skip=+\n\s*\\\|\n\s*#\\ \|^\s*#\\ + |
| 554 | \ end="$" |
| 555 | \ matchgroup=vim9Comment |
| 556 | \ end="\ze#" |
| 557 | \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vimCommentError |
| 558 | \ contains=@vim9Continue,vimType,vimTypeSep |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 559 | \ transparent |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 560 | |
| 561 | syn region vim9MethodDefComment contained |
| 562 | \ start="#.*" |
| 563 | \ skip=+\n\s*\\\|\n\s*#\\ + |
| 564 | \ end="$" |
| 565 | \ skipwhite skipempty nextgroup=vim9MethodDefBody,vimEnddef |
| 566 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 567 | syn region vim9MethodDefBody contained |
| 568 | \ start="^.\=" matchgroup=vimCommand end="\<enddef\>" |
| 569 | \ skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError |
| 570 | \ contains=@vim9MethodDefBodyList |
| 571 | |
| 572 | syn cluster vim9MethodDefBodyList contains=@vimDefBodyList,vim9This,vim9Super |
| 573 | |
| 574 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") |
| 575 | syn match vim9MethodNameError contained "\<[a-z0-9]\i\>" |
| 576 | endif |
Doug Kearns | adb703e | 2025-03-23 16:14:20 +0100 | [diff] [blame] | 577 | syn match vim9MethodName contained "\<_\=new\w*\>" |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 578 | syn keyword vim9MethodName contained empty len string |
| 579 | |
| 580 | syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError |
| 581 | |
| 582 | if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' |
| 583 | syn region vim9MethodDefFold contained start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent |
Doug Kearns | adb703e | 2025-03-23 16:14:20 +0100 | [diff] [blame] | 584 | syn region vim9MethodDefFold contained start="^\s*:\=def\s\+_\=new\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 585 | endif |
| 586 | |
| 587 | syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold |
| 588 | |
| 589 | " Classes {{{3 |
| 590 | syn cluster vim9ClassBodyList contains=vim9Abstract,vim9Class,vim9Comment,vim9LineComment,@vim9Continue,@vimExprList,vim9Extends,vim9Implements,@vim9MethodDef,vim9Public,vim9Static,vim9Const,vim9Final,vim9This,vim9Super,vim9Var |
| 591 | |
| 592 | syn match vim9Class contained "\<class\>" skipwhite nextgroup=vim9ClassName |
| 593 | syn match vim9ClassName contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Extends,vim9Implements |
| 594 | syn match vim9SuperClass contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Implements |
| 595 | syn match vim9ImplementedInterface contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9InterfaceListComma,vim9Extends |
| 596 | syn match vim9InterfaceListComma contained "," skipwhite skipnl nextgroup=vim9ImplementedInterface |
| 597 | syn keyword vim9Abstract abstract skipwhite skipnl nextgroup=vim9ClassBody,vim9AbstractDef |
| 598 | syn keyword vim9Extends contained extends skipwhite skipnl nextgroup=vim9SuperClass |
| 599 | syn keyword vim9Implements contained implements skipwhite skipnl nextgroup=vim9ImplementedInterface |
| 600 | syn keyword vim9Public contained public |
| 601 | syn keyword vim9Static contained static |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 602 | " FIXME: don't match as dictionary keys, remove when operators are not |
| 603 | " shared between Vim9 and legacy script |
| 604 | syn match vim9This contained "\.\@1<!\<this\>:\@!" |
| 605 | " super must be folowed by '.' |
| 606 | syn match vim9Super contained "\.\@1<!\<super\.\@=" |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 607 | |
| 608 | VimFoldc syn region vim9ClassBody start="\<class\>" matchgroup=vimCommand end="\<endclass\>" contains=@vim9ClassBodyList transparent |
| 609 | |
| 610 | " Enums {{{3 |
Doug Kearns | 1c58019 | 2025-05-01 17:43:17 +0200 | [diff] [blame] | 611 | syn cluster vim9EnumBodyList contains=vim9Comment,vim9LineComment,@vim9Continue,vim9Enum,@vimExprList,@vim9MethodDef,vim9Public,vim9Static,vim9Const,vim9Final,vim9This,vim9Var |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 612 | |
Doug Kearns | 1c58019 | 2025-05-01 17:43:17 +0200 | [diff] [blame] | 613 | syn match vim9Enum contained "\<enum\>" skipwhite nextgroup=vim9EnumName |
| 614 | |
| 615 | syn match vim9EnumName contained "\<\u\w*\>" skipwhite skipempty nextgroup=vim9EnumNameTrailing,vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue,vim9EnumImplements |
| 616 | syn match vim9EnumNameTrailing contained "\S.*" |
| 617 | syn region vim9EnumNameComment contained |
| 618 | \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$" |
| 619 | \ skipwhite skipempty nextgroup=vim9EnumNameComment,vim9EnumValue |
| 620 | \ contains=@vimCommentGroup,vimCommentString |
| 621 | " vim9EnumName's "skipempty" should only apply to comments and enum values and not implements clauses |
| 622 | syn match vim9EnumNameEmpty contained "^" skipwhite skipempty nextgroup=vim9EnumNameComment,vim9EnumValue |
| 623 | " allow line continuation between enum name and "implements" |
| 624 | syn match vim9EnumNameContinue contained |
| 625 | \ "^\s*\\" |
| 626 | \ skipwhite skipnl nextgroup=vim9EnumNameTrailing,vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue,vim9EnumImplements |
| 627 | \ contains=vimWhitespace |
| 628 | syn match vim9EnumNameContinueComment contained |
| 629 | \ "^\s*#\\ .*" |
| 630 | \ skipwhite skipnl nextgroup=vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue |
| 631 | \ contains=vimWhitespace |
| 632 | syn cluster vim9EnumNameContinue contains=vim9EnumNameContinue,vim9EnumNameContinueComment |
| 633 | |
| 634 | " enforce enum value list location |
| 635 | syn match vim9EnumValue contained "\<\a\w*\>" nextgroup=vim9EnumValueArgList,vim9EnumValueListComma,vim9Comment |
| 636 | syn match vim9EnumValueListComma contained "," skipwhite skipempty nextgroup=vim9EnumValue,vim9EnumValueListCommaComment |
| 637 | syn region vim9EnumValueListCommaComment contained |
| 638 | \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$" |
| 639 | \ skipwhite skipempty nextgroup=vim9EnumValueListCommaComment,vim9EnumValue |
| 640 | \ contains=@vimCommentGroup,vimCommentString |
| 641 | syn region vim9EnumValueArgList contained |
| 642 | \ matchgroup=vimParenSep start="(" end=")" |
| 643 | \ nextgroup=vim9EnumValueListComma |
| 644 | \ contains=@vimExprList,vimContinueString,vim9Comment |
| 645 | |
| 646 | syn keyword vim9EnumImplements contained implements skipwhite nextgroup=vim9EnumImplementedInterface |
| 647 | syn match vim9EnumImplementedInterface contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9EnumInterfaceListComma,vim9EnumImplementedInterfaceComment,vim9EnumValue |
| 648 | syn match vim9EnumInterfaceListComma contained "," skipwhite nextgroup=vim9EnumImplementedInterface |
| 649 | syn region vim9EnumImplementedInterfaceComment contained |
| 650 | \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$" |
| 651 | \ skipwhite skipempty nextgroup=vim9EnumImplementedInterfaceComment,vim9EnumValue |
| 652 | \ contains=@vimCommentGroup,vimCommentString |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 653 | |
| 654 | VimFolde syn region vim9EnumBody start="\<enum\>" matchgroup=vimCommand end="\<endenum\>" contains=@vim9EnumBodyList transparent |
| 655 | |
| 656 | " Interfaces {{{3 |
| 657 | " TODO: limit to decl only - no init values |
| 658 | syn cluster vim9InterfaceBodyList contains=vim9Comment,vim9LineComment,@vim9Continue,vim9Extends,vim9Interface,vim9AbstractDef,vim9Var |
| 659 | |
| 660 | syn match vim9Interface contained "\<interface\>" skipwhite nextgroup=vim9InterfaceName |
| 661 | syn match vim9InterfaceName contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Extends |
| 662 | |
| 663 | syn keyword vim9AbstractDef contained def skipwhite nextgroup=vim9AbstractDefName |
| 664 | syn match vim9AbstractDefName contained "\<\h\w*\>" skipwhite nextgroup=vim9AbstractDefParams contains=@vim9MethodName |
| 665 | syn region vim9AbstractDefParams contained |
| 666 | \ matchgroup=Delimiter start="(" end=")" |
| 667 | \ skipwhite skipnl nextgroup=vimDefComment,vim9AbstractDefReturnType,vimCommentError |
| 668 | \ contains=vimDefParam,vim9Comment,vimFuncParamEquals |
| 669 | syn region vim9AbstractDefReturnType contained |
| 670 | \ start=":\s" end="$" matchgroup=vim9Comment end="\ze[#"]" |
| 671 | \ skipwhite skipnl nextgroup=vimDefComment,vimCommentError |
| 672 | \ contains=vimTypeSep |
| 673 | \ transparent |
| 674 | |
| 675 | VimFoldi syn region vim9InterfaceBody start="\<interface\>" matchgroup=vimCommand end="\<endinterface\>" contains=@vim9InterfaceBodyList transparent |
| 676 | |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 677 | " Type Aliases {{{3 |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 678 | syn match vim9Type "\<ty\%[pe]\>" skipwhite nextgroup=vim9TypeAlias,vim9TypeAliasError |
| 679 | syn match vim9TypeAlias contained "\<\u\w*\>" skipwhite nextgroup=vim9TypeEquals |
| 680 | syn match vim9TypeEquals contained "=" skipwhite nextgroup=@vimType |
| 681 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_notypealiaserror") |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 682 | syn match vim9TypeAliasError contained "\<\l\w*\>" skipwhite nextgroup=vim9TypeEquals |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 683 | endif |
| 684 | endif |
| 685 | |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 686 | " Blocks: {{{2 |
| 687 | " ====== |
| 688 | Vim9 syn region vim9Block matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList |
| 689 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 690 | " Keymaps: {{{2 |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 691 | " ======= |
| 692 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 693 | syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,@vimKeymapLineComment |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 694 | syn match vimKeymapLhs "\S\+" contained skipwhite nextgroup=vimKeymapRhs contains=vimNotation |
| 695 | syn match vimKeymapRhs "\S\+" contained skipwhite nextgroup=vimKeymapTailComment contains=vimNotation |
| 696 | syn match vimKeymapTailComment "\S.*" contained |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 697 | |
| 698 | " TODO: remove when :" comment is matched in parts as "ex-colon comment" --djk |
| 699 | if s:vim9script |
| 700 | syn match vim9KeymapLineComment "#.*" contained contains=@vimCommentGroup,vimCommentString,vim9CommentTitle |
| 701 | else |
| 702 | syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle |
| 703 | endif |
| 704 | syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 705 | |
Doug Kearns | 7866d54 | 2024-08-23 18:37:55 +0200 | [diff] [blame] | 706 | syn region vimLoadkeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$" contains=vimKeymapStart |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 707 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 708 | " Special Filenames, Modifiers, Extension Removal: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 709 | " =============================================== |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 710 | syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst1 |
| 711 | syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst1 |
| 712 | syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1 |
| 713 | syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst1 |
| 714 | syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1 |
| 715 | syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst1 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 716 | syn match vimSpecFileMod "\(:[phtre]\)\+" contained |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 717 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 718 | " User-Specified Commands: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 719 | " ======================= |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 720 | syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,@vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange |
Doug Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 721 | |
| 722 | syn match vimUserCmd "\<com\%[mand]\>!\=" skipwhite nextgroup=vimUserCmdAttrs,vimUserCmdName contains=vimBang |
| 723 | syn match vimUserCmd +\<com\%[mand]\>!\=\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimUserCmdAttrs,vimUserCmdName contains=vimBang |
| 724 | |
| 725 | syn region vimUserCmdAttrs contained |
| 726 | \ start="-\l" |
| 727 | \ start=+^\s*\%(\\\|["#]\\ \)+ |
| 728 | \ end="\ze\s\u" |
| 729 | \ skipwhite nextgroup=vimUserCmdName |
| 730 | \ contains=@vimContinue,vimUserCmdAttr,vimUserCmdAttrError |
| 731 | \ transparent |
| 732 | syn match vimUserCmdAttrError contained "-\a\+\ze\%(\s\|=\)" |
| 733 | syn match vimUserCmdAttr contained "-addr=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrAddr |
| 734 | syn match vimUserCmdAttr contained "-bang\>" contains=vimUserCmdAttrKey |
| 735 | syn match vimUserCmdAttr contained "-bar\>" contains=vimUserCmdAttrKey |
| 736 | syn match vimUserCmdAttr contained "-buffer\>" contains=vimUserCmdAttrKey |
| 737 | syn match vimUserCmdAttr contained "-complete=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrComplete,vimUserCmdError |
| 738 | syn match vimUserCmdAttr contained "-count\>" contains=vimUserCmdAttrKey |
| 739 | syn match vimUserCmdAttr contained "-count=" contains=vimUserCmdAttrKey nextgroup=vimNumber |
| 740 | syn match vimUserCmdAttr contained "-keepscript\>" contains=vimUserCmdAttrKey |
| 741 | syn match vimUserCmdAttr contained "-nargs=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrNargs |
| 742 | syn match vimUserCmdAttr contained "-range\>" contains=vimUserCmdAttrKey |
| 743 | syn match vimUserCmdAttr contained "-range=" contains=vimUserCmdAttrKey nextgroup=vimNumber,vimUserCmdAttrRange |
| 744 | syn match vimUserCmdAttr contained "-register\>" contains=vimUserCmdAttrKey |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 745 | |
| 746 | syn match vimUserCmdAttrNargs contained "[01*?+]" |
| 747 | syn match vimUserCmdAttrRange contained "%" |
| 748 | |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 749 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 750 | syn match vimUserCmdError contained "\S\+\>" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 751 | endif |
Bram Moolenaar | a93fa7e | 2006-04-17 22:14:47 +0000 | [diff] [blame] | 752 | |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 753 | syn case ignore |
| 754 | syn keyword vimUserCmdAttrKey contained a[ddr] ban[g] bar bu[ffer] com[plete] cou[nt] k[eepscript] n[args] ra[nge] re[gister] |
Doug Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 755 | |
| 756 | " GEN_SYN_VIM: vimUserCmdAttrComplete, START_STR='syn keyword vimUserCmdAttrComplete contained', END_STR='' |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 757 | syn 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 Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 758 | syn 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 |
| 759 | syn keyword vimUserCmdAttrComplete contained custom customlist nextgroup=vimUserCmdAttrCompleteFunc,vimUserCmdError |
| 760 | syn match vimUserCmdAttrCompleteFunc contained ",\%([bwglstav]:\|<[sS][iI][dD]>\)\=\h\w*\%([.#]\h\w*\)*"hs=s+1 nextgroup=vimUserCmdError contains=vimVarScope,vimFuncSID |
| 761 | |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 762 | " GEN_SYN_VIM: vimUserCmdAttrAddr, START_STR='syn keyword vimUserCmdAttrAddr contained', END_STR='' |
| 763 | syn keyword vimUserCmdAttrAddr contained arguments arg buffers buf lines line loaded_buffers load other quickfix qf tabs tab windows win |
Doug Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 764 | syn keyword vimUserCmdAttrAddr contained arguments arg buffers buf lines line loaded_buffers load other quickfix qf tabs tab windows win |
| 765 | syn match vimUserCmdAttrAddr contained "?" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 766 | syn case match |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 767 | |
Doug Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 768 | syn match vimUserCmdName contained "\<\u[[:alnum:]]*\>" skipwhite nextgroup=vimUserCmdBlock,vimUserCmdReplacement |
| 769 | syn match vimUserCmdName contained +\<\u[[:alnum:]]*\>\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimUserCmdBlock,vimUserCmdReplacement |
| 770 | syn region vimUserCmdReplacement contained |
| 771 | \ start="\S" |
| 772 | \ start=+^\s*\%(\\\|["#]\\ \)+ |
| 773 | \ skip=+\n\s*\%(\\\|["#]\\ \)+ |
| 774 | \ end="$" |
| 775 | \ contains=@vimContinue,@vimUserCmdList,vimComFilter |
| 776 | syn region vimUserCmdBlock contained |
| 777 | \ matchgroup=vimSep |
| 778 | \ start="{" |
| 779 | \ end="^\s*\zs}" |
| 780 | \ contains=@vimDefBodyList |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 781 | |
Doug Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 782 | syn match vimDelcommand "\<delc\%[ommand]\>" skipwhite nextgroup=vimDelcommandAttr,vimDelcommandName |
| 783 | syn match vimDelcommandAttr contained "-buffer\>" skipwhite nextgroup=vimDelcommandName |
| 784 | syn match vimDelcommandName contained "\<\u[[:alnum:]]*\>" |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 785 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 786 | " Lower Priority Comments: after some vim commands... {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 787 | " ======================= |
dkearns | 959c3c8 | 2024-06-12 04:18:08 +1000 | [diff] [blame] | 788 | if get(g:, "vimsyn_comment_strings", 1) |
Doug Kearns | 35699f1 | 2024-09-19 19:51:59 +0200 | [diff] [blame] | 789 | syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' extend |
dkearns | 959c3c8 | 2024-06-12 04:18:08 +1000 | [diff] [blame] | 790 | endif |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 791 | |
| 792 | if s:vim9script |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 793 | syn cluster vimComment contains=vim9Comment |
| 794 | else |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 795 | syn cluster vimComment contains=vimComment |
| 796 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 797 | |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 798 | VimL syn region vimComment |
| 799 | \ excludenl |
| 800 | \ start=+"+ |
| 801 | \ skip=+\n\s*\%(\\\|"\\ \)+ |
| 802 | \ end="$" |
| 803 | \ contains=@vimCommentGroup,vimCommentString |
| 804 | \ extend |
| 805 | Vim9 syn region vim9Comment |
| 806 | \ excludenl |
| 807 | \ start="\%#=1\s\@1<=#\%({\@!\|{{\)" |
| 808 | \ skip="\n\s*\%(\\\|#\\ \)" |
| 809 | \ end="$" |
| 810 | \ contains=@vimCommentGroup,vimCommentString |
| 811 | \ extend |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 812 | |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 813 | syn match vim9CommentError contained "#.*" |
| 814 | syn match vimCommentError contained +".*+ |
| 815 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 816 | " Environment Variables: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 817 | " ===================== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 818 | syn match vimEnvvar "\$\I\i*" |
| 819 | syn match vimEnvvar "\${\I\i*}" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 820 | |
Doug Kearns | 68ba6c2 | 2025-02-16 16:40:12 +0100 | [diff] [blame] | 821 | " Strings {{{2 |
| 822 | " ======= |
| 823 | |
| 824 | " In-String Specials: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 825 | " Try to catch strings, if nothing else matches (therefore it must precede the others!) |
| 826 | " vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside []) |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 827 | " syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 828 | syn match vimPatSepErr contained "\\)" |
| 829 | syn match vimPatSep contained "\\|" |
Bram Moolenaar | b730f0c | 2018-11-25 03:56:26 +0100 | [diff] [blame] | 830 | syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\\]['"]" contains=@vimStringGroup |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 831 | syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline |
| 832 | syn match vimNotPatSep contained "\\\\" |
Bram Moolenaar | 6ba83ba | 2022-06-12 22:15:57 +0100 | [diff] [blame] | 833 | syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 834 | syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend |
| 835 | syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend |
Bram Moolenaar | acc2240 | 2020-06-07 21:07:18 +0200 | [diff] [blame] | 836 | "syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim |
Doug Kearns | 695522d | 2025-01-10 20:02:17 +0100 | [diff] [blame] | 837 | |
Bram Moolenaar | 6ba83ba | 2022-06-12 22:15:57 +0100 | [diff] [blame] | 838 | syn match vimEscape contained "\\." |
dkearns | e3e3934 | 2024-02-02 07:44:26 +1100 | [diff] [blame] | 839 | " syn match vimEscape contained +\\[befnrt\"]+ |
| 840 | syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}" |
| 841 | syn match vimEscape contained "\\<" contains=vimNotation |
| 842 | syn match vimEscape contained "\\<\*[^>]*>\=>" |
Doug Kearns | 695522d | 2025-01-10 20:02:17 +0100 | [diff] [blame] | 843 | syn match vimQuoteEscape contained "''" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 844 | |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 845 | syn region vimString oneline matchgroup=vimString start=+$'+ end=+'+ nextgroup=vimSubscript contains=@vimStringInterpolation,vimQuoteEscape extend |
| 846 | syn region vimString oneline matchgroup=vimString start=+$"+ end=+"+ nextgroup=vimSubscript contains=@vimStringInterpolation,@vimStringGroup extend |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 847 | syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList |
| 848 | syn match vimStringInterpolationBrace contained "{{" |
| 849 | syn match vimStringInterpolationBrace contained "}}" |
Doug Kearns | d164f2a | 2024-08-16 21:07:15 +0200 | [diff] [blame] | 850 | syn cluster vimStringInterpolation contains=vimStringInterpolationExpr,vimStringInterpolationBrace |
thinca | cf8695d | 2024-01-28 18:57:23 +0100 | [diff] [blame] | 851 | |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 852 | syn region vimContinueString contained matchgroup=vimContinueString start=+"+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+"+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,@vimStringGroup |
| 853 | syn region vimContinueString contained matchgroup=vimContinueString start=+'+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+'+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,vimQuoteEscape |
| 854 | syn region vimContinueString contained matchgroup=vimContinueString start=+$"+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+"+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,@vimStringInterpolation,@vimStringGroup |
| 855 | syn region vimContinueString contained matchgroup=vimContinueString start=+$'+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+'+ end="$" skipwhite nextgroup=vimSubscript,vimComment contains=@vimContinue,@vimStringInterpolation,vimQuoteEscape |
| 856 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 857 | " Substitutions: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 858 | " ============= |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 859 | syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation |
| 860 | syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation |
| 861 | syn cluster vimSubstList add=vimCollection |
Doug Kearns | 92f4e91 | 2024-06-05 19:45:43 +0200 | [diff] [blame] | 862 | syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat |
| 863 | syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat |
| 864 | syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat |
| 865 | syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 866 | " TODO: Vim9 illegal separators for abbreviated :s form are [-.:], :su\%[...] required |
| 867 | " : # is allowed but "not recommended" (see :h pattern-delimiter) |
| 868 | syn 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 |
| 869 | syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline |
| 870 | syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass |
| 871 | syn match vimCollClassErr contained "\[:.\{-\}:\]" |
| 872 | syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]" |
| 873 | syn match vimSubstSubstr contained "\\z\=\d" |
| 874 | syn match vimSubstTwoBS contained "\\\\" |
| 875 | syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags |
| 876 | syn match vimSubstFlags contained "[&cegiIlnpr#]\+" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 877 | |
Doug Kearns | 92f4e91 | 2024-06-05 19:45:43 +0200 | [diff] [blame] | 878 | " Vi compatibility |
| 879 | syn match vimSubstDelim contained "\\" |
| 880 | syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4 |
| 881 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 882 | " Marks, Registers, Addresses, Filters: {{{2 |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 883 | syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
Doug Kearns | d817609 | 2024-08-31 16:57:32 +0200 | [diff] [blame] | 884 | syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 885 | syn match vimMark ",\zs'[[\]{}()<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 886 | syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 887 | syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 888 | syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst1 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 889 | syn match vimPlainMark contained "'[a-zA-Z0-9]" |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 890 | syn match vimRange "[`'][a-zA-Z0-9],[`'][a-zA-Z0-9]" contains=vimMark skipwhite nextgroup=vimFilter |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 891 | |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 892 | syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]' |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 893 | syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]' |
| 894 | syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]' |
| 895 | syn match vimRegister '@"' |
| 896 | syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]' |
Doug Kearns | a9c0642 | 2025-02-12 20:44:17 +0100 | [diff] [blame] | 897 | syn match vimLetRegister contained '@["0-9\-a-zA-Z:.%#=*+~_/]' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 898 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 899 | syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1 |
| 900 | syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 901 | |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 902 | syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile |
Bram Moolenaar | d58a3bf | 2020-09-28 21:48:16 +0200 | [diff] [blame] | 903 | syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile |
| 904 | syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 905 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 906 | " Complex Repeats: (:h complex-repeat) {{{2 |
| 907 | " =============== |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 908 | syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 |
| 909 | syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 910 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 911 | " Set command and associated set-options (vimOptions) with comment {{{2 |
Doug Kearns | 6bdfeb0 | 2025-03-07 18:49:11 +0100 | [diff] [blame] | 912 | syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetArgs |
Doug Kearns | 2a6be83 | 2025-04-03 21:39:24 +0200 | [diff] [blame] | 913 | syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend |
| 914 | syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc |
| 915 | syn match vimSetEscape contained "\\\%(\\[|"]\|.\)" |
| 916 | syn match vimSetBarEscape contained "\\|" |
| 917 | syn match vimSetQuoteEscape contained +\\"+ |
| 918 | syn region vimSetArgs contained |
| 919 | \ start="\S" |
| 920 | \ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ + |
| 921 | \ end=+\ze\\\@1<![|"]+ |
| 922 | "\ assume this isn't an escaped char with backslash on the previous line |
| 923 | \ end=+^\s*\\\ze[|"]+ |
| 924 | \ end="\ze\s#" |
| 925 | \ end="$" |
| 926 | \ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment |
| 927 | \ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap |
| 928 | \ keepend |
| 929 | syn region vimSetEqual contained |
| 930 | \ matchgroup=vimOper |
| 931 | \ start="[=:]\|[-+^]=" |
| 932 | \ skip=+\\\s\|^\s*\%(\\\|["#]\\ \)+ |
| 933 | \ end="\ze\s" |
| 934 | \ contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep,vimSetEscape,vimSetBarEscape,vimSetQuoteEscape |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 935 | syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap |
| 936 | syn keyword vimSetAll contained all nextgroup=vimSetMod |
| 937 | syn keyword vimSetTermcap contained termcap |
Bram Moolenaar | 4072ba5 | 2020-12-23 13:56:35 +0100 | [diff] [blame] | 938 | syn match vimSetSep contained "[,:]" |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 939 | syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 940 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 941 | " Variable Declarations: {{{2 |
| 942 | " ===================== |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 943 | VimL syn keyword vimLet let skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList |
| 944 | VimL syn keyword vimConst cons[t] skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList |
| 945 | syn region vimVarList contained |
| 946 | \ start="\[" end="]" |
| 947 | \ contains=@vimContinue,@vimSpecialVar,vimVar |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 948 | |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 949 | VimL syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars |
| 950 | syn match vimUnletBang contained "\a\@1<=!" skipwhite nextgroup=vimUnletVars |
| 951 | syn region vimUnletVars contained |
| 952 | \ start="$\I\|\h" skip=+\n\s*\\\|\n\s*"\\ \|^\s*"\\ + end="$" end="\ze[|"]" |
| 953 | \ nextgroup=vimCmdSep,vimComment |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 954 | \ contains=@vimContinue,vimEnvvar,vimVar,vimVimVar |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 955 | |
Doug Kearns | 7884cc7 | 2024-08-23 18:01:35 +0200 | [diff] [blame] | 956 | VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='\%(^\z(\s*\)\S.*\)\@<==<<\s*trim\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1\=\z2$' extend |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 957 | VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\%(\s*\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1$' extend |
Doug Kearns | 7884cc7 | 2024-08-23 18:01:35 +0200 | [diff] [blame] | 958 | VimFoldh 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 |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 959 | VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*eval\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1$' contains=@vimStringInterpolation extend |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 960 | |
| 961 | Vim9 syn keyword vim9Const const skipwhite nextgroup=vim9Variable,vim9VariableList |
| 962 | Vim9 syn keyword vim9Final final skipwhite nextgroup=vim9Variable,vim9VariableList |
| 963 | Vim9 syn keyword vim9Var var skipwhite nextgroup=vim9Variable,vim9VariableList |
| 964 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 965 | syn match vim9Variable contained "\<\h\w*\>" skipwhite nextgroup=vimTypeSep,vimLetHereDoc,vimOper |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 966 | syn region vim9VariableList contained start="\[" end="]" contains=@vimContinue,@vimSpecialVar,vim9Variable |
| 967 | |
| 968 | " Lockvar and Unlockvar: {{{2 |
| 969 | " ===================== |
| 970 | syn keyword vimLockvar lockv[ar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars |
| 971 | syn keyword vimUnlockvar unlo[ckvar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars |
| 972 | syn match vimLockvarBang contained "\a\@1<=!" skipwhite nextgroup=vimLockvarVars |
| 973 | syn match vimLockvarDepth contained "\<[0-3]\>" skipwhite nextgroup=vimLockvarVars |
| 974 | syn region vimLockvarVars contained |
| 975 | \ start="\h" skip=+\n\s*\\\|\n\s*"\\ \|^\s*"\\ + end="$" end="\ze[|"]" |
| 976 | \ nextgroup=vimCmdSep,vimComment |
| 977 | \ contains=@vimContinue,vimVar |
| 978 | |
| 979 | hi def link vimLockvar vimCommand |
| 980 | hi def link vimUnlockvar vimCommand |
| 981 | hi def link vimLockvarBang vimBang |
| 982 | hi def link vimLockvarDepth vimNumber |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 983 | |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 984 | " For: {{{2 |
| 985 | " === |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 986 | " handles Vim9 and legacy for now |
| 987 | syn region vimFor |
| 988 | \ matchgroup=vimCommand |
| 989 | \ start="\<for\>" end="\<in\>" |
| 990 | \ skipwhite skipnl nextgroup=@vimForInContinue,vim9ForInComment,@vimExprList |
| 991 | \ contains=@vimContinue,vimVar,vimVarList,vim9VariableList |
| 992 | \ transparent |
| 993 | |
| 994 | syn match vim9ForInComment contained "#.*" skipwhite skipempty nextgroup=vimForInComment,@vimExprList |
| 995 | |
| 996 | syn match vimForInContinue contained "^\s*\zs\\" skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList |
| 997 | syn match vimForInContinueComment contained '^\s*\zs["#]\\ .*' skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList |
| 998 | syn cluster vimForInContinue contains=vimForInContinue,vimForInContinueComment |
dkearns | 76d6298 | 2024-03-23 05:55:25 +1100 | [diff] [blame] | 999 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1000 | " Abbreviations: {{{2 |
Bram Moolenaar | e37d50a | 2008-08-06 17:06:04 +0000 | [diff] [blame] | 1001 | " ============= |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 1002 | " GEN_SYN_VIM: vimCommand abbrev, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' |
dkearns | 1624970 | 2024-02-23 05:45:05 +1100 | [diff] [blame] | 1003 | syn keyword vimAbb ab[breviate] ca[bbrev] cnorea[bbrev] cuna[bbrev] ia[bbrev] inorea[bbrev] iuna[bbrev] norea[bbrev] una[bbreviate] skipwhite nextgroup=vimMapMod,vimMapLhs |
dkearns | 982e191 | 2024-03-28 20:06:03 +1100 | [diff] [blame] | 1004 | " GEN_SYN_VIM: vimCommand abclear, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod' |
| 1005 | syn keyword vimAbb abc[lear] cabc[lear] iabc[lear] skipwhite nextgroup=vimMapMod |
Bram Moolenaar | e37d50a | 2008-08-06 17:06:04 +0000 | [diff] [blame] | 1006 | |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 1007 | " Filename Patterns: {{{2 |
| 1008 | " ================= |
| 1009 | |
| 1010 | syn match vimWildcardQuestion contained "?" |
| 1011 | syn match vimWildcardStar contained "*" |
| 1012 | |
| 1013 | syn match vimWildcardBraceComma contained "," |
| 1014 | syn region vimWildcardBrace contained |
| 1015 | \ matchgroup=vimWildcard |
| 1016 | \ start="{" |
| 1017 | \ end="}" |
| 1018 | \ contains=vimWildcardEscape,vimWildcardBrace,vimWildcardBraceComma,vimWildcardQuestion,vimWildcardStar,vimWildcardBracket |
| 1019 | \ oneline |
| 1020 | |
| 1021 | syn match vimWildcardIntervalNumber contained "\d\+" |
| 1022 | syn match vimWildcardInterval contained "\\\\\\{\d\+\%(,\d\+\)\=\\}" contains=vimWildcardIntervalNumber |
| 1023 | |
| 1024 | |
| 1025 | syn match vimWildcardBracket contained "\[\%(\^\=]\=\%(\\.\|\[\([:.=]\)[^:.=]\+\1]\|[^][:space:]]\)*\)\@>]" |
| 1026 | \ contains=vimWildcardBracketStart,vimWildcardEscape |
| 1027 | |
| 1028 | syn match vimWildcardBracketCharacter contained "." nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketHyphen,vimWildcardBracketEnd |
| 1029 | syn match vimWildcardBracketRightBracket contained "]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd |
| 1030 | syn match vimWildcardBracketHyphen contained "-]\@!" nextgroup=@vimWildcardBracketCharacter |
| 1031 | syn match vimWildcardBracketEscape contained "\\." nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketHyphen,vimWildcardBracketEnd |
| 1032 | syn match vimWildcardBracketCharacterClass contained "\[:[^:]\+:]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd |
| 1033 | syn match vimWildcardBracketEquivalenceClass contained "\[=[^=]\+=]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd |
| 1034 | syn match vimWildcardBracketCollatingSymbol contained "\[\.[^.]\+\.]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd |
| 1035 | |
| 1036 | syn match vimWildcardBracketStart contained "\[" nextgroup=vimWildcardBracketCaret,vimWildcardBracketRightBracket,@vimWildcardBracketCharacter |
| 1037 | syn match vimWildcardBracketCaret contained "\^" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketRightBracket |
| 1038 | syn match vimWildcardBracketEnd contained "]" |
| 1039 | |
| 1040 | syn cluster vimWildcardBracketCharacter contains=vimWildcardBracketCharacter,vimWildcardBracketEscape,vimWildcardBracketCharacterClass,vimWildcardBracketEquivalenceClass,vimWildcardBracketCollatingSymbol |
| 1041 | |
| 1042 | syn match vimWildcardEscape contained "\\." |
| 1043 | |
| 1044 | syn cluster vimWildcard contains=vimWildcardQuestion,vimWildcardStar,vimWildcardBrace,vimWildcardBracket,vimWildcardInterval |
| 1045 | |
| 1046 | " Autocmd and Doauto{cmd,all}: {{{2 |
| 1047 | " =========================== |
| 1048 | |
| 1049 | " TODO: explicitly match the {cmd} arg rather than bailing out to TOP |
| 1050 | syn region vimAutocmdBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList |
| 1051 | |
| 1052 | syn match vimAutocmdGroup contained "\%(\\["|[:space:]]\|[^"|[:space:]]\)\+" skipwhite nextgroup=vimAutoEvent,vimAutoEventGlob |
| 1053 | syn match vimAutocmdBang contained "\a\@1<=!" skipwhite nextgroup=vimAutocmdGroup,vimAutoEvent,vimAutoEventGlob |
| 1054 | |
| 1055 | " TODO: cleaner handling of | in pattern position |
| 1056 | " : match pattern items in addition to wildcards |
| 1057 | syn region vimAutocmdPattern contained |
| 1058 | \ start="|\@!\S" |
| 1059 | \ skip="\\\\\|\\[,[:space:]]" |
| 1060 | \ end="\ze[,[:space:]]" |
| 1061 | \ end="$" |
| 1062 | \ skipwhite nextgroup=vimAutocmdPatternSep,vimAutocmdMod,vimAutocmdBlock |
| 1063 | \ contains=vimEnvvar,@vimWildcard,vimAutocmdPatternEscape |
| 1064 | syn match vimAutocmdBufferPattern contained "<buffer\%(=\%(\d\+\|abuf\)\)\=>" skipwhite nextgroup=vimAutocmdPatternSep,vimAutocmdMod,vimAutocmdBlock |
| 1065 | " trailing pattern separator comma allowed |
| 1066 | syn match vimAutocmdPatternSep contained "," skipwhite nextgroup=@vimAutocmdPattern,vimAutocmdMod,vimAutocmdBlock |
| 1067 | syn match vimAutocmdPatternEscape contained "\\." |
| 1068 | syn cluster vimAutocmdPattern contains=vimAutocmdPattern,vimAutocmdBufferPattern |
| 1069 | |
| 1070 | " TODO: Vim9 requires '++' prefix |
| 1071 | syn match vimAutocmdMod contained "\%(++\)\=\<nested\>" skipwhite nextgroup=vimAutocmdMod,vimAutocmdBlock |
| 1072 | syn match vimAutocmdMod contained "++once\>" skipwhite nextgroup=vimAutocmdMod,vimAutocmdBlock |
| 1073 | |
| 1074 | " higher priority than vimAutocmdGroup, assume no group is so named |
| 1075 | syn match vimAutoEventGlob contained "*" skipwhite nextgroup=@vimAutocmdPattern |
| 1076 | syn match vimAutoEventSep contained "\a\@1<=," nextgroup=vimAutoEvent |
| 1077 | |
| 1078 | syn match vimAutocmd "\<au\%[tocmd]\>" skipwhite nextgroup=vimAutocmdBang,vimAutocmdGroup,vimAutoEvent,vimAutoEventGlob |
| 1079 | |
| 1080 | |
| 1081 | syn match vimDoautocmdMod contained "<nomodeline>" skipwhite nextgroup=vimAutocmdGroup,vimAutoEvent |
| 1082 | syn match vimDoautocmd "\<do\%[autocmd]\>" skipwhite nextgroup=vimDoautocmdMod,vimAutocmdGroup,vimAutoEvent |
| 1083 | syn match vimDoautocmd "\<doautoa\%[ll]\>" skipwhite nextgroup=vimDoautocmdMod,vimAutocmdGroup,vimAutoEvent |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1084 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1085 | " Echo And Execute: -- prefer strings! {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1086 | " ================ |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 1087 | " NOTE: No trailing comments |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 1088 | |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 1089 | syn region vimEcho |
| 1090 | \ matchgroup=vimCommand |
| 1091 | \ start="\<ec\%[ho]\>" |
| 1092 | \ start="\<echoe\%[rr]\>" |
| 1093 | \ start="\<echom\%[sg]\>" |
| 1094 | \ start="\<echoc\%[onsole]\>" |
| 1095 | \ start="\<echon\>" |
| 1096 | \ start="\<echow\%[indow]\>" |
| 1097 | \ skip=+\\|\|\n\s*\\\|\n\s*"\\ + |
| 1098 | \ matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent |
| 1099 | |
| 1100 | syn match vimEchohl "\<echohl\=\>" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1101 | syn case ignore |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 1102 | syn keyword vimEchohlNone contained none |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1103 | syn case match |
| 1104 | |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1105 | syn cluster vimEcho contains=vimEcho,vimEchohl |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 1106 | |
| 1107 | syn region vimExecute matchgroup=vimCommand start="\<exe\%[cute]\>" skip=+\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 1108 | |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 1109 | " Filter: {{{2 |
| 1110 | " ====== |
| 1111 | syn match vimExFilter "\<filt\%[er]\>" skipwhite nextgroup=vimExFilterBang,vimExFilterPattern |
| 1112 | syn match vimExFilterBang contained "\a\@1<=!" skipwhite nextgroup=vimExFilterPattern |
| 1113 | syn region vimExFilterPattern contained |
| 1114 | \ start="[[:ident:]]" |
| 1115 | \ end="\ze[[:space:]\n]" |
| 1116 | \ skipwhite nextgroup=@vimCmdList |
| 1117 | \ contains=@vimSubstList |
| 1118 | \ oneline |
| 1119 | syn region vimExFilterPattern contained |
| 1120 | \ matchgroup=Delimiter |
| 1121 | \ start="\z([^[:space:][:ident:]|"]\)" |
| 1122 | \ skip="\\\\\|\\\z1" |
| 1123 | \ end="\z1" |
| 1124 | \ skipwhite nextgroup=@vimCmdList |
| 1125 | \ contains=@vimSubstList |
| 1126 | \ oneline |
| 1127 | |
| 1128 | " Grep and Make: {{{2 |
| 1129 | " ============= |
| 1130 | " | is the command separator, escaped with \| all other backslashes are passed through literally, no tail comments |
| 1131 | syn match vimGrep "\<l\=gr\%[ep]\>" skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep |
| 1132 | syn match vimGrepadd "\<l\=grepa\%[dd]\>" skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep |
| 1133 | syn region vimGrepArgs contained |
| 1134 | \ start="|\@!\S" |
| 1135 | \ skip=+\n\s*\%(\\\|[#"]\\ \)+ |
| 1136 | \ matchgroup=vimCmdSep |
| 1137 | \ end="|" |
| 1138 | \ end="$" |
| 1139 | "\ TODO: include vimSpecFile |
| 1140 | \ contains=vimGrepBarEscape |
| 1141 | syn match vimGrepBarEscape contained "\\|" |
| 1142 | syn match vimGrepBang contained "\a\@1<=!" skipwhite nextgroup=vimGrepArgs,vimCmdSep |
| 1143 | |
| 1144 | syn match vimMake "\<l\=make\=\>" skipwhite nextgroup=vimMakeBang,vimMakeArgs,vimCmdSep |
| 1145 | syn region vimMakeArgs contained |
| 1146 | \ start="|\@!\S" |
| 1147 | \ skip=+\n\s*\%(\\\|[#"]\\ \)+ |
| 1148 | \ matchgroup=vimCmdSep |
| 1149 | \ end="|" |
| 1150 | \ end="$" |
| 1151 | "\ TODO: include vimSpecFile |
| 1152 | \ contains=vimMakeBarEscape |
| 1153 | syn match vimMakeBarEscape contained "\\|" |
| 1154 | syn match vimMakeBang contained "\a\@1<=!" skipwhite nextgroup=vimMakeArgs,vimCmdSep |
| 1155 | |
| 1156 | syn match vimHelpgrep "\<l\=helpg\%[rep]\>" skipwhite nextgroup=vimHelpgrepBang,vimHelpgrepPattern |
| 1157 | syn region vimHelpgrepPattern contained |
| 1158 | \ start="\S" |
| 1159 | \ matchgroup=Special |
| 1160 | \ end="@\w\w\>" |
| 1161 | \ end="$" |
| 1162 | \ contains=@vimSubstList |
| 1163 | \ oneline |
| 1164 | |
| 1165 | " Vimgrep: {{{2 |
| 1166 | " ======= |
| 1167 | syn match vimVimgrep "\<l\=vim\%[grep]\>" skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern |
| 1168 | syn match vimVimgrepadd "\<l\=vimgrepa\%[dd]\>" skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern |
| 1169 | syn match vimVimgrepBang contained "\a\@1<=!" skipwhite nextgroup=vimVimgrepPattern |
| 1170 | syn region vimVimgrepPattern contained |
| 1171 | \ start="[[:ident:]]" |
| 1172 | \ end="\ze[[:space:]\n]" |
| 1173 | \ skipwhite nextgroup=vimVimgrepFile,vimCmdSep |
| 1174 | \ contains=@vimSubstList |
| 1175 | \ oneline |
| 1176 | syn region vimVimgrepPattern contained |
| 1177 | \ matchgroup=Delimiter |
| 1178 | \ start="\z([^[:space:][:ident:]|"]\)" |
| 1179 | \ skip="\\\\\|\\\z1" |
| 1180 | \ end="\z1" |
| 1181 | \ skipwhite nextgroup=vimVimgrepFlags,vimVimgrepFile,vimCmdSep |
| 1182 | \ contains=@vimSubstList |
| 1183 | \ oneline |
| 1184 | syn match vimVimgrepEscape contained "\\\%(\\|\|.\)" |
| 1185 | syn match vimVimgrepBarEscape contained "\\|" |
| 1186 | syn region vimVimgrepFile contained |
| 1187 | \ start="|\@!\S" |
| 1188 | \ matchgroup=vimCmdSep |
| 1189 | \ end="|" |
| 1190 | \ end="\ze\s" |
| 1191 | \ end="$" |
| 1192 | \ skipwhite nextgroup=vimVimgrepFile |
| 1193 | \ contains=vimSpecFile,vimVimgrepEscape,vimVimgrepBarEscape |
| 1194 | syn match vimVimgrepFlags contained "\<[gjf]\{,3\}\>" skipwhite nextgroup=vimVimgrepfile |
| 1195 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1196 | " Maps: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1197 | " ==== |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 1198 | " GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' |
| 1199 | syn 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 |
| 1200 | syn match vimMap "\<map\>" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
| 1201 | syn keyword vimMap no[remap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
dkearns | 1624970 | 2024-02-23 05:45:05 +1100 | [diff] [blame] | 1202 | " GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod' |
| 1203 | syn keyword vimMap cmapc[lear] imapc[lear] lmapc[lear] nmapc[lear] omapc[lear] smapc[lear] tmapc[lear] vmapc[lear] xmapc[lear] skipwhite nextgroup=vimMapMod |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 1204 | syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod |
| 1205 | " GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' |
| 1206 | syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] tunma[p] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapMod,vimMapLhs |
| 1207 | syn keyword vimUnmap unm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
| 1208 | |
Doug Kearns | 6bdfeb0 | 2025-03-07 18:49:11 +0100 | [diff] [blame] | 1209 | syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite nextgroup=vimMapRhs |
| 1210 | syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite skipnl nextgroup=vimMapRhsContinue |
dkearns | 5d67aef | 2024-03-10 04:01:22 +1100 | [diff] [blame] | 1211 | syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs |
Doug Kearns | 6bdfeb0 | 2025-03-07 18:49:11 +0100 | [diff] [blame] | 1212 | syn match vimMapMod contained "\%#=1<\%(buffer\|expr\|nowait\|script\|silent\|special\|unique\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs |
| 1213 | syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader skipnl nextgroup=vimMapRhsContinue |
dkearns | 5d67aef | 2024-03-10 04:01:22 +1100 | [diff] [blame] | 1214 | " assume a continuation comment introduces the RHS |
Doug Kearns | 6bdfeb0 | 2025-03-07 18:49:11 +0100 | [diff] [blame] | 1215 | syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader |
| 1216 | syn match vimMapLeader contained "\%#=1\c<\%(local\)\=leader>" contains=vimMapLeaderKey |
| 1217 | syn keyword vimMapModKey contained buffer expr nowait script silent special unique |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1218 | syn case ignore |
Doug Kearns | 6bdfeb0 | 2025-03-07 18:49:11 +0100 | [diff] [blame] | 1219 | syn keyword vimMapLeaderKey contained leader localleader |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1220 | syn case match |
| 1221 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1222 | " Menus: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1223 | " ===== |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1224 | " NOTE: tail comments disallowed |
| 1225 | " GEN_SYN_VIM: vimCommand menu, START_STR='syn keyword vimMenu', END_STR='skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus' |
| 1226 | syn 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 |
| 1227 | syn keyword vimMenu popu[p] skipwhite nextgroup=vimMenuBang,vimMenuName |
| 1228 | syn region vimMenuRhs contained contains=@vimContinue,vimNotation start="|\@!\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|" |
| 1229 | syn region vimMenuRhsContinue contained contains=@vimContinue,vimNotation start=+^\s*\%(\\\|"\\ \)+ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|" |
dkearns | ec21baf | 2024-03-20 04:04:42 +1100 | [diff] [blame] | 1230 | syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs |
| 1231 | syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+\ze\s*$" contained contains=vimMenuNotation,vimNotation skipwhite skipnl nextgroup=vimCmdSep,vimMenuRhsContinue |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1232 | syn match vimMenuNotation "&\a\|&&\|\\\s\|\\\." contained |
| 1233 | syn match vimMenuPriority "\<\d\+\%(\.\d\+\)*\>" contained skipwhite nextgroup=vimMenuName |
| 1234 | syn match vimMenuMod "\c<\%(script\|silent\|special\)>" contained skipwhite nextgroup=vimMenuName,vimMenuPriority,vimMenuMod contains=vimMapModKey,vimMapModErr |
| 1235 | syn keyword vimMenuStatus enable disable nextgroup=vimMenuName skipwhite |
| 1236 | syn match vimMenuBang "\a\@1<=!" contained skipwhite nextgroup=vimMenuName,vimMenuMod |
| 1237 | |
| 1238 | syn region vimMenutranslate |
| 1239 | \ matchgroup=vimCommand start="\<menut\%[ranslate]\>" |
| 1240 | \ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + |
| 1241 | \ end="$" matchgroup=vimCmdSep end="|" matchgroup=vimMenuClear end="\<clear\ze\s*\%(["#|]\|$\)" |
| 1242 | \ contains=@vimContinue,vimMenutranslateName keepend transparent |
| 1243 | " oneline is sufficient to match the current formatting in runtime/lang/*.vim |
| 1244 | syn match vimMenutranslateName "\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation |
| 1245 | syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1246 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1247 | " Angle-Bracket Notation: (tnx to Michael Geddes) {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1248 | " ====================== |
| 1249 | syn case ignore |
Doug Kearns | 68ba6c2 | 2025-02-16 16:40:12 +0100 | [diff] [blame] | 1250 | syn 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 |
dkearns | e3e3934 | 2024-02-02 07:44:26 +1100 | [diff] [blame] | 1251 | |
Doug Kearns | 68ba6c2 | 2025-02-16 16:40:12 +0100 | [diff] [blame] | 1252 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket |
| 1253 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket |
| 1254 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket |
| 1255 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket |
| 1256 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket |
| 1257 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket |
| 1258 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket |
dkearns | e3e3934 | 2024-02-02 07:44:26 +1100 | [diff] [blame] | 1259 | |
Doug Kearns | 68ba6c2 | 2025-02-16 16:40:12 +0100 | [diff] [blame] | 1260 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket |
| 1261 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 1262 | " syn match vimNotation contained '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket |
Doug Kearns | 68ba6c2 | 2025-02-16 16:40:12 +0100 | [diff] [blame] | 1263 | syn match vimNotation contained '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket |
| 1264 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket |
| 1265 | syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket |
dkearns | e3e3934 | 2024-02-02 07:44:26 +1100 | [diff] [blame] | 1266 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1267 | syn match vimBracket contained "[\\<>]" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1268 | syn case match |
| 1269 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1270 | " User Function Highlighting: {{{2 |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 1271 | " (following Gautam Iyer's suggestion) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1272 | " ========================== |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 1273 | syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute |
| 1274 | syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation,vim9MethodName,vim9Super,vim9This |
dkearns | b4b3d7d | 2024-03-16 04:53:53 +1100 | [diff] [blame] | 1275 | syn keyword vimFuncEcho contained ec ech echo |
| 1276 | |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 1277 | syn match vimMap "\<map\%(\s\+(\)\@=" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
| 1278 | |
Bram Moolenaar | 2547aa9 | 2020-07-26 17:00:44 +0200 | [diff] [blame] | 1279 | " User Command Highlighting: {{{2 |
Bram Moolenaar | d2ea7cf | 2021-05-30 20:54:13 +0200 | [diff] [blame] | 1280 | syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!' |
Bram Moolenaar | 2547aa9 | 2020-07-26 17:00:44 +0200 | [diff] [blame] | 1281 | |
Doug Kearns | 025dc48 | 2025-02-23 15:48:52 +0100 | [diff] [blame] | 1282 | " Vim user commands |
| 1283 | |
| 1284 | " Compiler plugins |
Doug Kearns | 6bdfeb0 | 2025-03-07 18:49:11 +0100 | [diff] [blame] | 1285 | syn match vimCompilerSet "\<CompilerSet\>" skipwhite nextgroup=vimSetArgs |
Doug Kearns | 025dc48 | 2025-02-23 15:48:52 +0100 | [diff] [blame] | 1286 | |
| 1287 | " runtime/makemenu.vim |
| 1288 | syn match vimSynMenu "\<SynMenu\>" skipwhite nextgroup=vimSynMenuPath |
| 1289 | syn match vimSynMenuPath contained ".*\ze:" nextgroup=vimSynMenuColon contains=vimMenuNotation |
| 1290 | syn match vimSynMenuColon contained ":" nextgroup=vimSynMenuName |
| 1291 | syn match vimSynMenuName contained "\w\+" |
| 1292 | |
| 1293 | syn cluster vimExUserCmdList contains=vimCompilerSet,vimSynMenu |
| 1294 | |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 1295 | " Errors And Warnings: {{{2 |
| 1296 | " ==================== |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1297 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 1298 | syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 1299 | syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1300 | syn match vimElseIfErr "\<else\s\+if\>" |
| 1301 | syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 1302 | endif |
| 1303 | |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 1304 | " If, While and Return: {{{2 |
| 1305 | " ==================== |
Doug Kearns | 68ba6c2 | 2025-02-16 16:40:12 +0100 | [diff] [blame] | 1306 | syn match vimNotFunc "\%#=1\<\%(if\|el\%[seif]\|retu\%[rn]\|while\)\>" skipwhite nextgroup=@vimExprList,vimNotation |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 1307 | syn match vimElse "\<el\%[se]\>" skipwhite nextgroup=vimComment,vim9Comment |
| 1308 | syn match vimEndif "\<en\%[dif]\>" skipwhite nextgroup=vimComment,vim9Comment |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 1309 | |
Doug Kearns | e85fdc7 | 2024-07-07 20:45:37 +0200 | [diff] [blame] | 1310 | " Match: {{{2 |
| 1311 | " ===== |
| 1312 | syn match vimMatch "\<[23]\=mat\%[ch]\>" skipwhite nextgroup=vimMatchGroup,vimMatchNone |
| 1313 | syn match vimMatchGroup contained "[[:alnum:]._-]\+" skipwhite nextgroup=vimMatchPattern |
| 1314 | syn case ignore |
| 1315 | syn keyword vimMatchNone contained none |
| 1316 | syn case match |
| 1317 | syn region vimMatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline |
| 1318 | |
Doug Kearns | bbe5252 | 2024-11-09 19:11:25 +0100 | [diff] [blame] | 1319 | " Normal: {{{2 |
| 1320 | " ====== |
| 1321 | syn match vimNormal "\<norm\%[al]\>!\=" skipwhite nextgroup=vimNormalArg contains=vimBang |
| 1322 | syn region vimNormalArg contained start="\S" skip=+\n\s*\\\|\n\s*["#]\\ + end="$" contains=@vimContinue |
Bram Moolenaar | 05159a0 | 2005-02-26 23:04:13 +0000 | [diff] [blame] | 1323 | |
Doug Kearns | 2f5a8c0 | 2025-04-05 15:55:36 +0200 | [diff] [blame] | 1324 | " Redir: {{{2 |
| 1325 | " ===== |
| 1326 | syn match vimRedir "\<redir\=\>" skipwhite nextgroup=vimRedirBang,vimRedirFileOperator,vimRedirVariableOperator,vimRedirRegister,vimRedirEnd |
| 1327 | syn match vimRedirBang contained "\a\@1<=!" skipwhite nextgroup=vimRedirFileOperator |
| 1328 | |
| 1329 | syn match vimRedirFileOperator contained ">>\=" skipwhite nextgroup=vimRedirFile |
| 1330 | syn region vimRedirFile contained |
| 1331 | \ start="\S" |
| 1332 | \ matchgroup=Normal |
| 1333 | \ end="\s*$" |
| 1334 | \ end="\s*\ze[|"]" |
| 1335 | \ nextgroup=vimCmdSep,vimComment |
| 1336 | \ contains=vimSpecFile |
| 1337 | syn match vimRedirRegisterOperator contained ">>\=" |
| 1338 | syn match vimRedirRegister contained "@[a-zA-Z*+"]" nextgroup=vimRedirRegisterOperator |
| 1339 | syn match vimRedirVariableOperator contained "=>>\=" skipwhite nextgroup=vimVar |
| 1340 | syn keyword vimRedirEnd contained END |
| 1341 | |
Doug Kearns | 262e25e | 2024-06-14 20:16:35 +0200 | [diff] [blame] | 1342 | " Sleep: {{{2 |
| 1343 | " ===== |
| 1344 | syn keyword vimSleep sl[eep] skipwhite nextgroup=vimSleepBang,vimSleepArg |
| 1345 | syn match vimSleepBang contained "\a\@1<=!" skipwhite nextgroup=vimSleepArg |
| 1346 | syn match vimSleepArg contained "\<\%(\d\+\)\=m\=\>" |
| 1347 | |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 1348 | " Sort: {{{2 |
| 1349 | " ==== |
| 1350 | syn match vimSort "\<sort\=\>" skipwhite nextgroup=vimSortBang,@vimSortOptions,vimSortPattern,vimCmdSep |
| 1351 | syn match vimSortBang contained "\a\@1<=!" skipwhite nextgroup=@vimSortOptions,vimSortPattern,vimCmdSep |
| 1352 | syn match vimSortOptionsError contained "\a\+" |
| 1353 | syn match vimSortOptions contained "\<[ilur]*[nfxob]\=[ilur]*\>" skipwhite nextgroup=vimSortPattern,vimCmdSep |
| 1354 | syn region vimSortPattern contained |
| 1355 | \ matchgroup=Delimiter |
| 1356 | \ start="\z([^[:space:][:alpha:]|]\)" |
| 1357 | \ skip="\\\\\|\\\z1" |
| 1358 | \ end="\z1" |
| 1359 | \ skipwhite nextgroup=@vimSortOptions,vimCmdSep |
| 1360 | \ contains=@vimSubstList |
| 1361 | \ oneline |
| 1362 | |
| 1363 | syn cluster vimSortOptions contains=vimSortOptions,vimSortOptionsError |
| 1364 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1365 | " Syntax: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1366 | "======= |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1367 | syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial |
| 1368 | syn 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 |
| 1369 | syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP |
| 1370 | |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1371 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1372 | syn match vimSynError contained "\i\+" |
| 1373 | syn match vimSynError contained "\i\+=" nextgroup=vimGroupList |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1374 | endif |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1375 | syn match vimSynContains contained "\<contain\%(s\|edin\)=" skipwhite skipnl nextgroup=vimGroupList |
| 1376 | syn match vimSynKeyContainedin contained "\<containedin=" skipwhite skipnl nextgroup=vimGroupList |
| 1377 | syn match vimSynNextgroup contained "\<nextgroup=" skipwhite skipnl nextgroup=vimGroupList |
dkearns | c79646d | 2024-01-05 08:58:48 +1100 | [diff] [blame] | 1378 | if has("conceal") |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1379 | " no whitespace allowed after '=' |
dkearns | c79646d | 2024-01-05 08:58:48 +1100 | [diff] [blame] | 1380 | syn match vimSynCchar contained "\<cchar=" nextgroup=vimSynCcharValue |
| 1381 | syn match vimSynCcharValue contained "\S" |
| 1382 | endif |
| 1383 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1384 | syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,@vimComment |
Bram Moolenaar | d960d76 | 2011-09-21 19:22:10 +0200 | [diff] [blame] | 1385 | syn cluster vimFuncBodyList add=vimSyntax |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1386 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1387 | " Syntax: case {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1388 | syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1389 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1390 | syn match vimSynCaseError contained "\i\+" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1391 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1392 | syn keyword vimSynCase contained ignore match |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1393 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1394 | " Syntax: clear {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1395 | syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1396 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1397 | " Syntax: cluster {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1398 | syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1399 | syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError |
| 1400 | syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList |
| 1401 | syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1402 | |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1403 | " Syntax: conceal {{{2 |
| 1404 | syn match vimSynType contained "\<conceal\>" skipwhite nextgroup=vimSynConceal,vimSynConcealError |
| 1405 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynconcealerror") |
| 1406 | syn match vimSynConcealError contained "\i\+" |
Brad King | d4634a2 | 2024-01-03 10:17:24 -0500 | [diff] [blame] | 1407 | endif |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1408 | syn keyword vimSynConceal contained on off |
| 1409 | |
| 1410 | " Syntax: foldlevel {{{2 |
| 1411 | syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldlevel,vimSynFoldlevelError |
| 1412 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldlevelerror") |
| 1413 | syn match vimSynFoldlevelError contained "\i\+" |
| 1414 | endif |
| 1415 | syn keyword vimSynFoldlevel contained start minimum |
Brad King | d4634a2 | 2024-01-03 10:17:24 -0500 | [diff] [blame] | 1416 | |
Bram Moolenaar | 13d5aee | 2016-01-21 23:36:05 +0100 | [diff] [blame] | 1417 | " Syntax: iskeyword {{{2 |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1418 | syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimSynIskeyword |
| 1419 | syn keyword vimSynIskeyword contained clear |
| 1420 | syn match vimSynIskeyword contained "\S\+" contains=vimSynIskeywordSep |
| 1421 | syn match vimSynIskeywordSep contained "," |
Bram Moolenaar | 13d5aee | 2016-01-21 23:36:05 +0100 | [diff] [blame] | 1422 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1423 | " Syntax: include {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1424 | syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1425 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1426 | " Syntax: keyword {{{2 |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1427 | syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1428 | syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1429 | syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1430 | syn match vimSynKeyOpt contained "\%#=1\<\%(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1431 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1432 | " Syntax: match {{{2 |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1433 | syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1434 | syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1435 | syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1436 | syn match vimSynMtchOpt contained "\%#=1\<\%(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1437 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1438 | " Syntax: off and on {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1439 | syn keyword vimSynType contained enable list manual off on reset |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1440 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1441 | " Syntax: region {{{2 |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1442 | syn cluster vimSynRegPatGroup contains=@vimContinue,vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation |
| 1443 | syn cluster vimSynRegGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1444 | syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1445 | syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynRegGroup |
| 1446 | syn match vimSynRegOpt contained "\%#=1\<\%(conceal\%(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1447 | syn match vimSynReg contained "\<\%(start\|skip\|end\)=" nextgroup=vimSynRegPat |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1448 | syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1449 | syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip=/\\\\\|\\\z1\|\n\s*\\\|\n\s*"\\ / end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1450 | syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\=" |
| 1451 | syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\=," nextgroup=vimSynPatMod |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1452 | syn match vimSynPatMod contained "lc=\d\+" |
| 1453 | syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod |
| 1454 | syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" |
| 1455 | syn match vimSynNotPatRange contained "\\\\\|\\\[" |
| 1456 | syn match vimMtchComment contained '"[^"]\+$' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1457 | |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1458 | " Syntax: spell {{{2 |
| 1459 | syn keyword vimSynType contained spell skipwhite nextgroup=vimSynSpell,vimSynSpellError |
| 1460 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynspellerror") |
| 1461 | syn match vimSynSpellError contained "\i\+" |
| 1462 | endif |
| 1463 | syn keyword vimSynSpell contained default notoplevel toplevel |
| 1464 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1465 | " Syntax: sync {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1466 | " ============ |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1467 | syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncClear,vimSyncMatch,vimSyncError,vimSyncRegion,vimSyncArgs |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1468 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1469 | syn match vimSyncError contained "\i\+" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1470 | endif |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1471 | |
| 1472 | syn region vimSyncArgs contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=vimSyncLines,vimSyncLinebreak,vimSyncLinecont,vimSyncFromstart,vimSyncCcomment |
| 1473 | |
| 1474 | syn keyword vimSyncCcomment contained ccomment skipwhite nextgroup=vimGroupName |
| 1475 | syn keyword vimSyncClear contained clear skipwhite nextgroup=vimSyncGroupName |
| 1476 | syn keyword vimSyncFromstart contained fromstart |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1477 | syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName |
Doug Kearns | b55f022 | 2025-03-15 09:29:31 +0100 | [diff] [blame] | 1478 | syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynRegion |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1479 | syn match vimSyncLinebreak contained "\<linebreaks=" nextgroup=vimNumber |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1480 | syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1481 | syn match vimSyncLines contained "\<lines=" nextgroup=vimNumber |
| 1482 | syn match vimSyncLines contained "\<minlines=" nextgroup=vimNumber |
| 1483 | syn match vimSyncLines contained "\<maxlines=" nextgroup=vimNumber |
| 1484 | syn match vimSyncGroupName contained "\<\h\w*\>" skipwhite nextgroup=vimSyncKey |
| 1485 | syn match vimSyncKey contained "\<grouphere\>" skipwhite nextgroup=vimSyncGroup |
| 1486 | syn match vimSyncKey contained "\<groupthere\>" skipwhite nextgroup=vimSyncGroup |
| 1487 | syn match vimSyncGroup contained "\<\h\w*\>" skipwhite nextgroup=vimSynRegPat,vimSyncNone |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1488 | syn keyword vimSyncNone contained NONE |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1489 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1490 | " Additional IsCommand: here by reasons of precedence {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1491 | " ==================== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1492 | syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1493 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1494 | " Highlighting: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1495 | " ============ |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1496 | syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,@vimComment |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1497 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1498 | syn match vimHiCtermError contained "\D\i*" |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1499 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1500 | syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1501 | syn match vimHiBang contained "\a\@1<=!" skipwhite nextgroup=@vimHighlightCluster |
Bram Moolenaar | d960d76 | 2011-09-21 19:22:10 +0200 | [diff] [blame] | 1502 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1503 | syn match vimHiGroup contained "\i\+" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1504 | syn case ignore |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1505 | syn keyword vimHiNone contained NONE |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1506 | syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl underdashed underdotted underdouble |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1507 | syn keyword vimFgBgAttrib contained none bg background fg foreground |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1508 | syn case match |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1509 | syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib |
| 1510 | syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1511 | syn case ignore |
Bram Moolenaar | d2ea7cf | 2021-05-30 20:54:13 +0200 | [diff] [blame] | 1512 | syn 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 Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1513 | syn match vimHiCtermColor contained "\<color\d\{1,3}\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1514 | syn case match |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1515 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1516 | syn match vimHiFontname contained "[a-zA-Z\-*]\+" |
| 1517 | syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" |
| 1518 | syn match vimHiGuiRgb contained "#\x\{6}" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1519 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1520 | " Highlighting: hi group key=arg ... {{{2 |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1521 | syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiNone,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1522 | syn region vimHiKeyList contained start="\i\+" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1523 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1524 | syn match vimHiKeyError contained "\i\+="he=e-1 |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1525 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1526 | syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1527 | syn match vimHiStartStop contained "\c\%(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1528 | syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList |
Bram Moolenaar | 83d1b19 | 2015-04-13 14:22:40 +0200 | [diff] [blame] | 1529 | syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError |
Bram Moolenaar | 2547aa9 | 2020-07-26 17:00:44 +0200 | [diff] [blame] | 1530 | syn match vimHiCtermul contained "\cctermul="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError |
PMunch | a606f3a | 2023-11-15 15:35:49 +0100 | [diff] [blame] | 1531 | syn match vimHiCtermfont contained "\cctermfont="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1532 | syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList |
| 1533 | syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname |
| 1534 | syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib |
| 1535 | syn match vimHiTermcap contained "\S\+" contains=vimNotation |
Bram Moolenaar | 83d1b19 | 2015-04-13 14:22:40 +0200 | [diff] [blame] | 1536 | syn match vimHiNmbr contained '\d\+' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1537 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1538 | " Highlight: clear {{{2 |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1539 | syn keyword vimHiClear contained clear skipwhite nextgroup=vimGroup,vimHiGroup |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1540 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1541 | " Highlight: link {{{2 |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 1542 | " see tst24 (hi def vs hi) (Jul 06, 2018) |
| 1543 | "syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1544 | " TODO: simplify and allow line continuations --djk |
| 1545 | syn 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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1546 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1547 | " Control Characters: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1548 | " ================== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1549 | syn match vimCtrlChar "[--]" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1550 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1551 | " Beginners - Patterns that involve ^ {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1552 | " ========= |
Doug Kearns | 35699f1 | 2024-09-19 19:51:59 +0200 | [diff] [blame] | 1553 | Vim9 syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle extend |
| 1554 | VimL syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle extend |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 1555 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1556 | syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1557 | syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup |
dkearns | 059cbe8 | 2024-06-12 03:27:53 +1000 | [diff] [blame] | 1558 | |
dkearns | ae321b5 | 2024-06-15 23:06:17 +1000 | [diff] [blame] | 1559 | " allowed anywhere in the file |
| 1560 | if !s:vim9script |
| 1561 | syn match vimShebangError "^\s*\zs#!.*" display |
| 1562 | endif |
| 1563 | syn match vimShebang "\%^#!.*" display |
| 1564 | |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1565 | syn match vimContinue "^\s*\zs\\" |
Doug Kearns | 4f010c9 | 2025-02-13 20:24:42 +0100 | [diff] [blame] | 1566 | syn match vimContinueComment '^\s*\zs["#]\\ .*' extend |
| 1567 | syn match vim9ContinueComment "^\s*\zs#\\ .*" extend |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 1568 | syn cluster vimContinue contains=vimContinue,vimContinueComment |
| 1569 | syn cluster vim9Continue contains=vimContinue,vim9ContinueComment |
| 1570 | |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 1571 | syn region vimString start='^\s*\\"' end='"' oneline keepend contains=@vimStringGroup,vimContinue |
| 1572 | syn region vimString start="^\s*\\'" end="'" oneline keepend contains=vimQuoteEscape,vimContinue |
| 1573 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1574 | syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1575 | syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1576 | |
Bram Moolenaar | 18144c8 | 2006-04-12 21:52:12 +0000 | [diff] [blame] | 1577 | " Searches And Globals: {{{2 |
| 1578 | " ==================== |
Doug Kearns | c273f1a | 2025-01-20 21:53:01 +0100 | [diff] [blame] | 1579 | VimL syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1580 | syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained |
Doug Kearns | c273f1a | 2025-01-20 21:53:01 +0100 | [diff] [blame] | 1581 | Vim9 syn match vim9Search '^\s*:[/?].*' contains=vim9SearchDelim |
| 1582 | syn match vim9SearchDelim '^\s*\zs:[/?]\|[/?]$' contained contains=vimCmdSep |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 1583 | syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1 |
| 1584 | syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1 |
Bram Moolenaar | e2f98b9 | 2006-03-29 21:18:24 +0000 | [diff] [blame] | 1585 | |
Hirohito Higashi | fbe4a8f | 2025-04-27 15:28:30 +0200 | [diff] [blame] | 1586 | " Vim9 script Regions: {{{2 |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1587 | " ================== |
| 1588 | |
| 1589 | if s:vim9script |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 1590 | syn cluster vimLegacyTop contains=TOP,vim9LegacyHeader,vim9Comment,vim9LineComment |
| 1591 | VimFoldH syn region vim9LegacyHeader start="\%^" end="^\ze\s*vim9s\%[cript]\>" contains=@vimLegacyTop,vimComment,vimLineComment |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1592 | |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 1593 | syn keyword vim9Vim9ScriptArg noclear contained |
| 1594 | syn keyword vim9Vim9Script vim9s[cript] nextgroup=vim9Vim9ScriptArg skipwhite |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1595 | endif |
| 1596 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1597 | " Embedded Scripts: {{{2 |
| 1598 | " ================ |
| 1599 | " perl,ruby : Benoit Cerrina |
| 1600 | " python,tcl : Johannes Zellner |
| 1601 | " mzscheme, lua : Charles Campbell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1602 | |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 1603 | " Allows users to specify the type of embedded script highlighting |
| 1604 | " they want: (perl/python/ruby/tcl support) |
| 1605 | " g:vimsyn_embed == 0 : don't embed any scripts |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 1606 | " g:vimsyn_embed =~# 'l' : embed Lua (but only if vim supports it) |
| 1607 | " g:vimsyn_embed =~# 'm' : embed MzScheme (but only if vim supports it) |
| 1608 | " g:vimsyn_embed =~# 'p' : embed Perl (but only if vim supports it) |
| 1609 | " g:vimsyn_embed =~# 'P' : embed Python (but only if vim supports it) |
| 1610 | " g:vimsyn_embed =~# 'r' : embed Ruby (but only if vim supports it) |
| 1611 | " g:vimsyn_embed =~# 't' : embed Tcl (but only if vim supports it) |
Bram Moolenaar | 7cba6c0 | 2013-09-05 22:13:31 +0200 | [diff] [blame] | 1612 | if !exists("g:vimsyn_embed") |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1613 | let g:vimsyn_embed= "lmpPr" |
Bram Moolenaar | 7cba6c0 | 2013-09-05 22:13:31 +0200 | [diff] [blame] | 1614 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1615 | |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 1616 | " [-- lua --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1617 | let s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim") |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 1618 | if !filereadable(s:luapath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1619 | for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n") |
| 1620 | if filereadable(fnameescape(s:luapath)) |
| 1621 | let s:luapath= fnameescape(s:luapath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1622 | break |
| 1623 | endif |
| 1624 | endfor |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 1625 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1626 | if (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath) |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 1627 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1628 | syn cluster vimFuncBodyList add=vimLuaRegion |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 1629 | exe "syn include @vimLuaScript ".s:luapath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1630 | VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+^\z(\s*\)lua\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimLuaScript |
| 1631 | VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimLuaScript |
| 1632 | VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+^\z(\s*\)lua\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimLuaScript |
| 1633 | VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+^\.$+ contains=@vimLuaScript |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 1634 | syn cluster vimFuncBodyList add=vimLuaRegion |
| 1635 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1636 | syn region vimEmbedError start=+^\z(\s*\)lua\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1637 | syn region vimEmbedError start=+lua\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1638 | syn region vimEmbedError start=+^\z(\s*\)lua\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1639 | syn region vimEmbedError start=+lua\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 1640 | endif |
| 1641 | unlet s:luapath |
| 1642 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1643 | " [-- perl --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1644 | let s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1645 | if !filereadable(s:perlpath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1646 | for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n") |
| 1647 | if filereadable(fnameescape(s:perlpath)) |
| 1648 | let s:perlpath= fnameescape(s:perlpath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1649 | break |
| 1650 | endif |
| 1651 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1652 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1653 | if (g:vimsyn_embed =~# 'p' && has("perl")) && filereadable(s:perlpath) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1654 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1655 | syn cluster vimFuncBodyList add=vimPerlRegion |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1656 | exe "syn include @vimPerlScript ".s:perlpath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1657 | VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimPerlScript |
| 1658 | VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimPerlScript |
| 1659 | VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimPerlScript |
| 1660 | VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1661 | syn cluster vimFuncBodyList add=vimPerlRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1662 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1663 | syn region vimEmbedError start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1664 | syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1665 | syn region vimEmbedError start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1666 | syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1667 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1668 | unlet s:perlpath |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1669 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1670 | " [-- ruby --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1671 | let s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1672 | if !filereadable(s:rubypath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1673 | for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n") |
| 1674 | if filereadable(fnameescape(s:rubypath)) |
| 1675 | let s:rubypath= fnameescape(s:rubypath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1676 | break |
| 1677 | endif |
| 1678 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1679 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1680 | if (g:vimsyn_embed =~# 'r' && has("ruby")) && filereadable(s:rubypath) |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1681 | syn cluster vimFuncBodyList add=vimRubyRegion |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1682 | unlet! b:current_syntax |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1683 | exe "syn include @vimRubyScript ".s:rubypath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1684 | VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimRubyScript |
| 1685 | VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub\%[y]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimRubyScript |
| 1686 | VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimRubyScript |
| 1687 | VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub\%[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1688 | syn cluster vimFuncBodyList add=vimRubyRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1689 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1690 | syn region vimEmbedError start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1691 | syn region vimEmbedError start=+rub\%[y]\s*<<\s*\z(\S.*\)+ end=+^\z1$+ |
| 1692 | syn region vimEmbedError start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1693 | syn region vimEmbedError start=+rub\%[y]\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1694 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1695 | unlet s:rubypath |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1696 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1697 | " [-- python --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1698 | let s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1699 | if !filereadable(s:pythonpath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1700 | for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n") |
| 1701 | if filereadable(fnameescape(s:pythonpath)) |
| 1702 | let s:pythonpath= fnameescape(s:pythonpath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1703 | break |
| 1704 | endif |
| 1705 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1706 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1707 | if g:vimsyn_embed =~# 'P' && has("pythonx") && filereadable(s:pythonpath) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1708 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1709 | syn cluster vimFuncBodyList add=vimPythonRegion |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1710 | exe "syn include @vimPythonScript ".s:pythonpath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1711 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimPythonScript |
| 1712 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\z(\S\+\)+ end=+^\z1$+ contains=@vimPythonScript |
| 1713 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimPythonScript |
| 1714 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*$+ end=+^\.$+ contains=@vimPythonScript |
| 1715 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=\z(\S\+\)+ end=+^\z1$+ contains=@vimPythonScript |
| 1716 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=$+ end=+^\.$+ contains=@vimPythonScript |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1717 | syn cluster vimFuncBodyList add=vimPythonRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1718 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1719 | syn region vimEmbedError start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1720 | syn region vimEmbedError start=+py\%[thon][3x]\=\s*<<\s*\z(\S\+\)+ end=+^\z1$+ |
| 1721 | syn region vimEmbedError start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s*$+ end=+^\z1\.$+ |
| 1722 | syn region vimEmbedError start=+py\%[thon][3x]\=\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1723 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1724 | unlet s:pythonpath |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1725 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1726 | " [-- tcl --] {{{3 |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1727 | if has("win32") || has("win95") || has("win64") || has("win16") |
| 1728 | " apparently has("tcl") has been hanging vim on some windows systems with cygwin |
| 1729 | let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$') |
| 1730 | else |
| 1731 | let s:trytcl= 1 |
| 1732 | endif |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1733 | if s:trytcl |
| 1734 | let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim") |
| 1735 | if !filereadable(s:tclpath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1736 | for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n") |
| 1737 | if filereadable(fnameescape(s:tclpath)) |
| 1738 | let s:tclpath= fnameescape(s:tclpath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1739 | break |
| 1740 | endif |
| 1741 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1742 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1743 | if (g:vimsyn_embed =~# 't' && has("tcl")) && filereadable(s:tclpath) |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1744 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1745 | syn cluster vimFuncBodyList add=vimTclRegion |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1746 | exe "syn include @vimTclScript ".s:tclpath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1747 | VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimTclScript |
| 1748 | VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimTclScript |
| 1749 | VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimTclScript |
| 1750 | VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+ contains=@vimTclScript |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1751 | syn cluster vimFuncBodyList add=vimTclScript |
| 1752 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1753 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1754 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1755 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1756 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1757 | endif |
| 1758 | unlet s:tclpath |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1759 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1760 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1761 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1762 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1763 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 9964e46 | 2007-05-05 17:54:07 +0000 | [diff] [blame] | 1764 | endif |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1765 | unlet s:trytcl |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1766 | |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1767 | " [-- mzscheme --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1768 | let s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1769 | if !filereadable(s:mzschemepath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1770 | for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n") |
| 1771 | if filereadable(fnameescape(s:mzschemepath)) |
| 1772 | let s:mzschemepath= fnameescape(s:mzschemepath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1773 | break |
| 1774 | endif |
| 1775 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1776 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1777 | if (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath) |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1778 | unlet! b:current_syntax |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 1779 | let s:iskKeep= &isk |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1780 | syn cluster vimFuncBodyList add=vimMzSchemeRegion |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1781 | exe "syn include @vimMzSchemeScript ".s:mzschemepath |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 1782 | let &isk= s:iskKeep |
| 1783 | unlet s:iskKeep |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1784 | VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimMzSchemeScript |
| 1785 | VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimMzSchemeScript |
| 1786 | VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimMzSchemeScript |
| 1787 | VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+^\.$+ contains=@vimMzSchemeScript |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1788 | syn cluster vimFuncBodyList add=vimMzSchemeRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1789 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1790 | syn region vimEmbedError start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1791 | syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1792 | syn region vimEmbedError start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1793 | syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1794 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1795 | unlet s:mzschemepath |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1796 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1797 | " Synchronize (speed) {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1798 | "============ |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 1799 | if exists("g:vimsyn_minlines") |
| 1800 | exe "syn sync minlines=".g:vimsyn_minlines |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1801 | endif |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 1802 | exe "syn sync maxlines=".s:vimsyn_maxlines |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1803 | syn sync linecont "^\s\+\\" |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1804 | syn sync linebreaks=1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1805 | syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]" |
| 1806 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1807 | " ==================== |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1808 | " Highlighting Settings {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1809 | " ==================== |
| 1810 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1811 | if !exists("skip_vim_syntax_inits") |
| 1812 | if !exists("g:vimsyn_noerror") |
| 1813 | hi def link vimBehaveError vimError |
| 1814 | hi def link vimCollClassErr vimError |
| 1815 | hi def link vimErrSetting vimError |
| 1816 | hi def link vimEmbedError vimError |
| 1817 | hi def link vimFTError vimError |
| 1818 | hi def link vimFunctionError vimError |
| 1819 | hi def link vimFunc vimError |
| 1820 | hi def link vimHiAttribList vimError |
| 1821 | hi def link vimHiCtermError vimError |
| 1822 | hi def link vimHiKeyError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1823 | hi def link vimMapModErr vimError |
dkearns | ae321b5 | 2024-06-15 23:06:17 +1000 | [diff] [blame] | 1824 | hi def link vimShebangError vimError |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 1825 | hi def link vimSortOptionsError Error |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1826 | hi def link vimSubstFlagErr vimError |
| 1827 | hi def link vimSynCaseError vimError |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1828 | hi def link vimSyncError vimError |
| 1829 | hi def link vimSynConcealError vimError |
| 1830 | hi def link vimSynError vimError |
| 1831 | hi def link vimSynFoldlevelError vimError |
| 1832 | hi def link vimSynIskeywordError vimError |
| 1833 | hi def link vimSynSpellError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1834 | hi def link vimBufnrWarn vimWarn |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 1835 | |
| 1836 | hi def link vim9TypeAliasError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1837 | endif |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1838 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1839 | hi def link vimAbb vimCommand |
| 1840 | hi def link vimAddress vimMark |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 1841 | hi def link vimAugroupBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1842 | hi def link vimAugroupError vimError |
| 1843 | hi def link vimAugroupKey vimCommand |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 1844 | hi def link vimAutocmd vimCommand |
| 1845 | hi def link vimAutocmdBang vimBang |
| 1846 | hi def link vimAutocmdPatternEscape Special |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1847 | hi def link vimAutoEvent Type |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 1848 | hi def link vimAutoEventGlob Type |
| 1849 | hi def link vimAutocmdBufferPattern Special |
| 1850 | hi def link vimAutocmdMod Special |
| 1851 | hi def link vimAutocmdPatternSep vimSep |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1852 | hi def link vimBang vimOper |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 1853 | hi def link vimBehaveBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1854 | hi def link vimBehaveModel vimBehave |
| 1855 | hi def link vimBehave vimCommand |
| 1856 | hi def link vimBracket Delimiter |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 1857 | hi def link vimCall vimCommand |
dkearns | a3bddb7 | 2024-06-14 01:48:10 +1000 | [diff] [blame] | 1858 | hi def link vimCatch vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1859 | hi def link vimCmplxRepeat SpecialChar |
| 1860 | hi def link vimCommand Statement |
| 1861 | hi def link vimComment Comment |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 1862 | hi def link vimCommentError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1863 | hi def link vimCommentString vimString |
| 1864 | hi def link vimCommentTitle PreProc |
| 1865 | hi def link vimCondHL vimCommand |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 1866 | hi def link vimConst vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1867 | hi def link vimContinue Special |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1868 | hi def link vimContinueComment vimComment |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 1869 | hi def link vimContinueString vimString |
Doug Kearns | 4a530a6 | 2025-02-03 18:59:09 +0100 | [diff] [blame] | 1870 | hi def link vimCount Number |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1871 | hi def link vimCtrlChar SpecialChar |
Doug Kearns | 4a530a6 | 2025-02-03 18:59:09 +0100 | [diff] [blame] | 1872 | hi def link vimDebuggreedy vimCommand |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 1873 | hi def link vimDefComment vim9Comment |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1874 | hi def link vimDefKey vimCommand |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 1875 | hi def link vimDefParam vimVar |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 1876 | hi def link vimDelcommand vimCommand |
| 1877 | hi def link vimDelcommandAttr vimUserCmdAttr |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 1878 | hi def link vimDoautocmd vimCommand |
| 1879 | hi def link vimDoautocmdMod Special |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 1880 | hi def link vimEcho vimCommand |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 1881 | hi def link vimEchohlNone vimGroup |
| 1882 | hi def link vimEchohl vimCommand |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 1883 | hi def link vimElse vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1884 | hi def link vimElseIfErr Error |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1885 | hi def link vimEndfunction vimCommand |
| 1886 | hi def link vimEnddef vimCommand |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 1887 | hi def link vimEndif vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1888 | hi def link vimEnvvar PreProc |
| 1889 | hi def link vimError Error |
Bram Moolenaar | 6ba83ba | 2022-06-12 22:15:57 +0100 | [diff] [blame] | 1890 | hi def link vimEscape Special |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 1891 | hi def link vimExFilter vimCommand |
| 1892 | hi def link vimExFilterBang vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1893 | hi def link vimFBVar vimVar |
| 1894 | hi def link vimFgBgAttrib vimHiAttrib |
Bram Moolenaar | cbaff5e | 2022-04-08 17:45:08 +0100 | [diff] [blame] | 1895 | hi def link vimFuncEcho vimCommand |
dkearns | 1c97b5c | 2023-12-13 02:47:43 +1100 | [diff] [blame] | 1896 | hi def link vimFor vimCommand |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 1897 | hi def link vimForInContinue vimContinue |
| 1898 | hi def link vimForInContinueComment vimContinueComment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1899 | hi def link vimFTCmd vimCommand |
| 1900 | hi def link vimFTOption vimSynType |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1901 | hi def link vimFuncBang vimBang |
| 1902 | hi def link vimFuncComment vimComment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1903 | hi def link vimFuncKey vimCommand |
| 1904 | hi def link vimFuncName Function |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1905 | hi def link vimFuncMod Special |
| 1906 | hi def link vimFuncParam vimVar |
| 1907 | hi def link vimFuncParamEquals vimOper |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 1908 | hi def link vimFuncScope vimVarScope |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 1909 | hi def link vimFuncSID vimNotation |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 1910 | hi def link vimGrep vimCommand |
| 1911 | hi def link vimGrepadd vimCommand |
| 1912 | hi def link vimGrepBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1913 | hi def link vimGroupAdd vimSynOption |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1914 | hi def link vimGroupName Normal |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1915 | hi def link vimGroupRem vimSynOption |
| 1916 | hi def link vimGroupSpecial Special |
| 1917 | hi def link vimGroup Type |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 1918 | hi def link vimHelpgrep vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1919 | hi def link vimHiAttrib PreProc |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1920 | hi def link vimHiBang vimBang |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1921 | hi def link vimHiClear Type |
| 1922 | hi def link vimHiCtermColor Constant |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1923 | hi def link vimHiCtermFgBg vimHiTerm |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1924 | hi def link vimHiCtermfont vimHiTerm |
| 1925 | hi def link vimHiCtermul vimHiTerm |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1926 | hi def link vimHiCTerm vimHiTerm |
| 1927 | hi def link vimHighlight vimCommand |
| 1928 | hi def link vimHiGroup vimGroupName |
| 1929 | hi def link vimHiGuiFgBg vimHiTerm |
| 1930 | hi def link vimHiGuiFont vimHiTerm |
| 1931 | hi def link vimHiGuiRgb vimNumber |
| 1932 | hi def link vimHiGui vimHiTerm |
| 1933 | hi def link vimHiNmbr Number |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 1934 | hi def link vimHiNone vimGroup |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1935 | hi def link vimHiStartStop vimHiTerm |
| 1936 | hi def link vimHiTerm Type |
| 1937 | hi def link vimHLGroup vimGroup |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1938 | hi def link vimInsert vimString |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1939 | hi def link vim9KeymapLineComment vimKeymapLineComment |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 1940 | hi def link vimKeymapLineComment vimComment |
| 1941 | hi def link vimKeymapTailComment vimComment |
Doug Kearns | 722fbd1 | 2025-03-28 19:36:37 +0100 | [diff] [blame] | 1942 | hi def link vimLambdaBrace Delimiter |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 1943 | hi def link vimLambdaOperator vimOper |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1944 | hi def link vimLet vimCommand |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1945 | hi def link vimLetHereDoc vimString |
| 1946 | hi def link vimLetHereDocStart Special |
| 1947 | hi def link vimLetHereDocStop Special |
Doug Kearns | 2f5a8c0 | 2025-04-05 15:55:36 +0200 | [diff] [blame] | 1948 | hi def link vimLetRegister vimRegister |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1949 | hi def link vimLineComment vimComment |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 1950 | hi def link vimMake vimCommand |
| 1951 | hi def link vimMakeadd vimCommand |
| 1952 | hi def link vimMakeBang vimBang |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1953 | hi def link vimMapBang vimBang |
Doug Kearns | 6bdfeb0 | 2025-03-07 18:49:11 +0100 | [diff] [blame] | 1954 | hi def link vimMapLeader vimBracket |
| 1955 | hi def link vimMapLeaderKey vimNotation |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1956 | hi def link vimMapModKey vimFuncSID |
| 1957 | hi def link vimMapMod vimBracket |
| 1958 | hi def link vimMap vimCommand |
| 1959 | hi def link vimMark Number |
| 1960 | hi def link vimMarkNumber vimNumber |
Doug Kearns | e85fdc7 | 2024-07-07 20:45:37 +0200 | [diff] [blame] | 1961 | hi def link vimMatch vimCommand |
| 1962 | hi def link vimMatchGroup vimGroup |
| 1963 | hi def link vimMatchNone vimGroup |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1964 | hi def link vimMenuBang vimBang |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1965 | hi def link vimMenuClear Special |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1966 | hi def link vimMenuMod vimMapMod |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1967 | hi def link vimMenuName PreProc |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1968 | hi def link vimMenu vimCommand |
| 1969 | hi def link vimMenuNotation vimNotation |
| 1970 | hi def link vimMenuPriority Number |
| 1971 | hi def link vimMenuStatus Special |
| 1972 | hi def link vimMenutranslateComment vimComment |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 1973 | hi def link vim9MethodName vimFuncName |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1974 | hi def link vimMtchComment vimComment |
Doug Kearns | bbe5252 | 2024-11-09 19:11:25 +0100 | [diff] [blame] | 1975 | hi def link vimNormal vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1976 | hi def link vimNotation Special |
| 1977 | hi def link vimNotFunc vimCommand |
| 1978 | hi def link vimNotPatSep vimString |
| 1979 | hi def link vimNumber Number |
| 1980 | hi def link vimOperError Error |
| 1981 | hi def link vimOper Operator |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 1982 | hi def link vimOperContinue vimContinue |
| 1983 | hi def link vimOperContinueComment vimContinueComment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1984 | hi def link vimOption PreProc |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 1985 | hi def link vimOptionVar Identifier |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 1986 | hi def link vimOptionVarName Identifier |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1987 | hi def link vimParenSep Delimiter |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 1988 | hi def link vimPatSepErr vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1989 | hi def link vimPatSepR vimPatSep |
| 1990 | hi def link vimPatSep SpecialChar |
| 1991 | hi def link vimPatSepZone vimString |
| 1992 | hi def link vimPatSepZ vimPatSep |
| 1993 | hi def link vimPattern Type |
| 1994 | hi def link vimPlainMark vimMark |
| 1995 | hi def link vimPlainRegister vimRegister |
Doug Kearns | 695522d | 2025-01-10 20:02:17 +0100 | [diff] [blame] | 1996 | hi def link vimQuoteEscape vimEscape |
Doug Kearns | 2f5a8c0 | 2025-04-05 15:55:36 +0200 | [diff] [blame] | 1997 | hi def link vimRedir vimCommand |
| 1998 | hi def link vimRedirBang vimBang |
| 1999 | hi def link vimRedirFileOperator vimOper |
| 2000 | hi def link vimRedirRegisterOperator vimOper |
| 2001 | hi def link vimRedirVariableOperator vimOper |
| 2002 | hi def link vimRedirEnd Special |
| 2003 | hi def link vimRedirRegister vimRegister |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2004 | hi def link vimRegister SpecialChar |
| 2005 | hi def link vimScriptDelim Comment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2006 | hi def link vimSearch vimString |
Doug Kearns | c273f1a | 2025-01-20 21:53:01 +0100 | [diff] [blame] | 2007 | hi def link vimSearchDelim Delimiter |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2008 | hi def link vimSep Delimiter |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 2009 | hi def link vimSet vimCommand |
| 2010 | hi def link vimSetAll vimOption |
| 2011 | hi def link vimSetBang vimBang |
Doug Kearns | 2a6be83 | 2025-04-03 21:39:24 +0200 | [diff] [blame] | 2012 | hi def link vimSetComment vimComment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2013 | hi def link vimSetMod vimOption |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 2014 | hi def link vimSetSep vimSep |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 2015 | hi def link vimSetTermcap vimOption |
dkearns | ae321b5 | 2024-06-15 23:06:17 +1000 | [diff] [blame] | 2016 | hi def link vimShebang PreProc |
Doug Kearns | 262e25e | 2024-06-14 20:16:35 +0200 | [diff] [blame] | 2017 | hi def link vimSleep vimCommand |
| 2018 | hi def link vimSleepArg Constant |
| 2019 | hi def link vimSleepBang vimBang |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 2020 | hi def link vimSort vimCommand |
| 2021 | hi def link vimSortBang vimBang |
| 2022 | hi def link vimSortOptions Special |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2023 | hi def link vimSpecFile Identifier |
| 2024 | hi def link vimSpecFileMod vimSpecFile |
| 2025 | hi def link vimSpecial Type |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2026 | hi def link vimStringCont vimString |
| 2027 | hi def link vimString String |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 2028 | hi def link vimStringEnd vimString |
thinca | cf8695d | 2024-01-28 18:57:23 +0100 | [diff] [blame] | 2029 | hi def link vimStringInterpolationBrace vimEscape |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2030 | hi def link vimSubst1 vimSubst |
| 2031 | hi def link vimSubstDelim Delimiter |
| 2032 | hi def link vimSubstFlags Special |
| 2033 | hi def link vimSubstSubstr SpecialChar |
| 2034 | hi def link vimSubstTwoBS vimString |
| 2035 | hi def link vimSubst vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2036 | hi def link vimSynCase Type |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 2037 | hi def link vimSyncCcomment Type |
dkearns | c79646d | 2024-01-05 08:58:48 +1100 | [diff] [blame] | 2038 | hi def link vimSynCchar vimSynOption |
| 2039 | hi def link vimSynCcharValue Character |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 2040 | hi def link vimSyncClear Type |
| 2041 | hi def link vimSyncFromstart Type |
| 2042 | hi def link vimSyncGroup vimGroupName |
| 2043 | hi def link vimSyncGroupName vimGroupName |
| 2044 | hi def link vimSyncKey Type |
| 2045 | hi def link vimSyncLinebreak Type |
| 2046 | hi def link vimSyncLinecont Type |
| 2047 | hi def link vimSyncLines Type |
| 2048 | hi def link vimSyncMatch Type |
| 2049 | hi def link vimSyncNone Type |
| 2050 | hi def link vimSynConceal Type |
| 2051 | hi def link vimSynContains vimSynOption |
| 2052 | hi def link vimSyncRegion Type |
| 2053 | hi def link vimSynFoldlevel Type |
| 2054 | hi def link vimSynIskeyword Type |
| 2055 | hi def link vimSynIskeywordSep Delimiter |
| 2056 | hi def link vimSynKeyContainedin vimSynContains |
| 2057 | hi def link vimSynKeyOpt vimSynOption |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2058 | hi def link vimSynMtchGrp vimSynOption |
| 2059 | hi def link vimSynMtchOpt vimSynOption |
| 2060 | hi def link vimSynNextgroup vimSynOption |
| 2061 | hi def link vimSynNotPatRange vimSynRegPat |
| 2062 | hi def link vimSynOption Special |
| 2063 | hi def link vimSynPatRange vimString |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 2064 | hi def link vimSynReg Type |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2065 | hi def link vimSynRegOpt vimSynOption |
| 2066 | hi def link vimSynRegPat vimString |
Doug Kearns | 0fab891 | 2025-03-10 21:04:53 +0100 | [diff] [blame] | 2067 | hi def link vimSynSpell Type |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2068 | hi def link vimSyntax vimCommand |
| 2069 | hi def link vimSynType vimSpecial |
dkearns | a3bddb7 | 2024-06-14 01:48:10 +1000 | [diff] [blame] | 2070 | hi def link vimThrow vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2071 | hi def link vimTodo Todo |
Bram Moolenaar | 4d8f476 | 2021-06-27 15:18:56 +0200 | [diff] [blame] | 2072 | hi def link vimType Type |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 2073 | hi def link vimUnlet vimCommand |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 2074 | hi def link vimUnletBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2075 | hi def link vimUnmap vimMap |
Doug Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 2076 | hi def link vimUserCmd vimCommand |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 2077 | hi def link vimUserCmdAttrAddr vimSpecial |
Doug Kearns | 520a2c7 | 2025-04-08 20:50:00 +0200 | [diff] [blame] | 2078 | hi def link vimUserCmdAttrComplete vimSpecial |
| 2079 | hi def link vimUserCmdAttrCompleteFunc vimVar |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 2080 | hi def link vimUserCmdAttrNargs vimSpecial |
| 2081 | hi def link vimUserCmdAttrRange vimSpecial |
| 2082 | hi def link vimUserCmdAttrKey vimUserCmdAttr |
| 2083 | hi def link vimUserCmdAttr Special |
| 2084 | hi def link vimUserCmdAttrError Error |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2085 | hi def link vimUserCmdError Error |
Doug Kearns | 3c07eb0 | 2024-09-02 10:03:37 +0200 | [diff] [blame] | 2086 | hi def link vimUserCmdKey vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2087 | hi def link vimUserFunc Normal |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 2088 | hi def link vimVar Normal |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 2089 | hi def link vimVarScope Identifier |
Doug Kearns | 9b171bd | 2025-04-10 19:59:22 +0200 | [diff] [blame] | 2090 | hi def link vimVimgrep vimCommand |
| 2091 | hi def link vimVimgrepadd vimCommand |
| 2092 | hi def link vimVimgrepBang vimBang |
| 2093 | hi def link vimVimgrepFlags Special |
Doug Kearns | 3dca512 | 2025-03-09 16:30:28 +0100 | [diff] [blame] | 2094 | hi def link vimVimVar Identifier |
| 2095 | hi def link vimVimVarName Identifier |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2096 | hi def link vimWarn WarningMsg |
Doug Kearns | fa3b104 | 2025-04-22 19:48:13 +0200 | [diff] [blame] | 2097 | hi def link vimWildcard Special |
| 2098 | hi def link vimWildcardBraceComma vimWildcard |
| 2099 | hi def link vimWildcardBracket vimWildcard |
| 2100 | hi def link vimWildcardBracketCaret vimWildcard |
| 2101 | hi def link vimWildcardBracketCharacter Normal |
| 2102 | hi def link vimWildcardBracketCharacter Normal |
| 2103 | hi def link vimWildcardBracketCharacterClass vimWildCard |
| 2104 | hi def link vimWildcardBracketCollatingSymbol vimWildCard |
| 2105 | hi def link vimWildcardBracketEnd vimWildcard |
| 2106 | hi def link vimWildcardBracketEquivalenceClass vimWildCard |
| 2107 | hi def link vimWildcardBracketEscape vimWildcard |
| 2108 | hi def link vimWildcardBracketHyphen vimWildcard |
| 2109 | hi def link vimWildcardBracketRightBracket vimWildcardBracketCharacter |
| 2110 | hi def link vimWildcardBracketStart vimWildcard |
| 2111 | hi def link vimWildcardEscape vimWildcard |
| 2112 | hi def link vimWildcardInterval vimWildcard |
| 2113 | hi def link vimWildcardQuestion vimWildcard |
| 2114 | hi def link vimWildcardStar vimWildcard |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2115 | |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2116 | hi def link vim9Abstract vimCommand |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2117 | hi def link vim9Boolean Boolean |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2118 | hi def link vim9Class vimCommand |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2119 | hi def link vim9Comment Comment |
| 2120 | hi def link vim9CommentError vimError |
| 2121 | hi def link vim9CommentTitle PreProc |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 2122 | hi def link vim9ConstructorDefParam vimVar |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2123 | hi def link vim9Const vimCommand |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2124 | hi def link vim9ContinueComment vimContinueComment |
| 2125 | hi def link vim9Enum vimCommand |
Doug Kearns | 1c58019 | 2025-05-01 17:43:17 +0200 | [diff] [blame] | 2126 | hi def link vim9EnumImplementedInterfaceComment vim9Comment |
| 2127 | hi def link vim9EnumImplements vim9Implements |
| 2128 | hi def link vim9EnumNameComment vim9Comment |
| 2129 | hi def link vim9EnumNameContinue vimContinue |
| 2130 | hi def link vim9EnumNameContinueComment vim9Comment |
| 2131 | hi def link vim9EnumValueListCommaComment vim9Comment |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2132 | hi def link vim9Export vimCommand |
| 2133 | hi def link vim9Extends Keyword |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2134 | hi def link vim9Final vimCommand |
| 2135 | hi def link vim9For vimCommand |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 2136 | hi def link vim9ForInComment vim9Comment |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2137 | hi def link vim9Implements Keyword |
| 2138 | hi def link vim9AbstractDef vimCommand |
| 2139 | hi def link vim9Interface vimCommand |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 2140 | hi def link vim9LambdaOperator vimOper |
| 2141 | hi def link vim9LambdaOperatorComment vim9Comment |
Doug Kearns | 722fbd1 | 2025-03-28 19:36:37 +0100 | [diff] [blame] | 2142 | hi def link vim9LambdaParen vimParenSep |
Doug Kearns | 1aa287e | 2025-02-10 22:00:27 +0100 | [diff] [blame] | 2143 | hi def link vim9LhsRegister vimLetRegister |
| 2144 | hi def link vim9LhsVariable vimVar |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2145 | hi def link vim9LineComment vimComment |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2146 | hi def link vim9MethodDef vimCommand |
Doug Kearns | dd3f1c0 | 2025-03-17 20:27:13 +0100 | [diff] [blame] | 2147 | hi def link vim9MethodDefComment vimDefComment |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2148 | hi def link vim9MethodNameError vimFunctionError |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2149 | hi def link vim9Null Constant |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2150 | hi def link vim9Public vimCommand |
Doug Kearns | c273f1a | 2025-01-20 21:53:01 +0100 | [diff] [blame] | 2151 | hi def link vim9Search vimString |
| 2152 | hi def link vim9SearchDelim Delimiter |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2153 | hi def link vim9Static vimCommand |
| 2154 | hi def link vim9Super Identifier |
| 2155 | hi def link vim9This Identifier |
| 2156 | hi def link vim9Type vimCommand |
| 2157 | hi def link vim9TypeEquals vimOper |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2158 | hi def link vim9Variable vimVar |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2159 | hi def link vim9Var vimCommand |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2160 | hi def link vim9Vim9ScriptArg Special |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2161 | hi def link vim9Vim9Script vimCommand |
Doug Kearns | 025dc48 | 2025-02-23 15:48:52 +0100 | [diff] [blame] | 2162 | |
| 2163 | hi def link vimCompilerSet vimCommand |
| 2164 | hi def link vimSynMenu vimCommand |
| 2165 | hi def link vimSynMenuPath vimMenuName |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 2166 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2167 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 2168 | " Current Syntax Variable: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2169 | let b:current_syntax = "vim" |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 2170 | |
| 2171 | " --------------------------------------------------------------------- |
| 2172 | " Cleanup: {{{1 |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 2173 | delc Vim9 |
| 2174 | delc VimL |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 2175 | delc VimFolda |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2176 | delc VimFoldc |
| 2177 | delc VimFolde |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 2178 | delc VimFoldf |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 2179 | delc VimFoldh |
| 2180 | delc VimFoldH |
Doug Kearns | 818c641 | 2024-10-06 17:00:48 +0200 | [diff] [blame] | 2181 | delc VimFoldi |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 2182 | delc VimFoldl |
| 2183 | delc VimFoldm |
| 2184 | delc VimFoldp |
| 2185 | delc VimFoldP |
| 2186 | delc VimFoldr |
| 2187 | delc VimFoldt |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 2188 | let &cpo = s:keepcpo |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 2189 | unlet s:keepcpo s:vim9script |
dkearns | 5d67aef | 2024-03-10 04:01:22 +1100 | [diff] [blame] | 2190 | " vim:ts=18 fdm=marker ft=vim |