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> |
| 5 | " URL: https://github.com/vim-jp/syntax-vim-ex |
Doug Kearns | 7884cc7 | 2024-08-23 18:01:35 +0200 | [diff] [blame] | 6 | " Last Change: 2024 Aug 23 |
Christian Brabandt | f9ca139 | 2024-02-19 20:37:11 +0100 | [diff] [blame] | 7 | " Former Maintainer: Charles E. Campbell |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 8 | |
| 9 | " DO NOT CHANGE DIRECTLY. |
| 10 | " THIS FILE PARTLY GENERATED BY gen_syntax_vim.vim. |
| 11 | " (Search string "GEN_SYN_VIM:" in this file) |
| 12 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 13 | " Automatically generated keyword lists: {{{1 |
| 14 | |
| 15 | " Quit when a syntax file was already loaded {{{2 |
| 16 | if exists("b:current_syntax") |
| 17 | finish |
| 18 | endif |
Bram Moolenaar | 113cb51 | 2021-11-07 20:27:04 +0000 | [diff] [blame] | 19 | let s:keepcpo= &cpo |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 20 | set cpo&vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 21 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 22 | let s:vim9script = "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>' |
| 23 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 24 | " vimTodo: contains common special-notices for comments {{{2 |
| 25 | " Use the vimCommentGroup cluster to add your own. |
Bram Moolenaar | e271909 | 2015-01-10 15:09:25 +0100 | [diff] [blame] | 26 | syn keyword vimTodo contained COMBAK FIXME TODO XXX |
Bram Moolenaar | 217ad92 | 2005-03-20 22:37:15 +0000 | [diff] [blame] | 27 | syn cluster vimCommentGroup contains=vimTodo,@Spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 28 | |
| 29 | " regular vim commands {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 30 | " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='' |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 31 | syn keyword vimCommand contained abo[veleft] abs[tract] 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] class clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] comp[iler] |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 32 | syn keyword vimCommand contained con[tinue] conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delc[ommand] 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] el[se] elsei[f] em[enu] en[dif] endin[terface] endc[lass] ende[num] endfo[r] endt[ry] endw[hile] ene[w] enu[m] ev[al] ex exi[t] exp[ort] exu[sage] f[ile] files filet[ype] filt[er] fin[d] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpg[rep] helpt[ags] |
| 33 | syn keyword vimCommand contained ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] if ij[ump] il[ist] imp[ort] int[ro] inte[rface] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] 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] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loadk[eymap] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow] ls m[ove] ma[rk] mak[e] |
| 34 | syn keyword vimCommand contained 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] p[rint] pa[ckadd] packl[oadall] 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] pub[lic] 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] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] |
| 35 | syn keyword vimCommand contained 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] sc[riptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] si[malt] sig[n] sil[ent] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sr[ewind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stat[ic] 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] |
| 36 | syn keyword vimCommand contained 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] thi[s] tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] ty[pe] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wh[ile] 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 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 37 | |
Aliaksei Budavei | dfcef89 | 2024-02-18 21:02:14 +0300 | [diff] [blame] | 38 | " Lower priority for _new_ to distinguish constructors from the command. |
| 39 | syn match vimCommand contained "\<new\>(\@!" |
Bram Moolenaar | e271909 | 2015-01-10 15:09:25 +0100 | [diff] [blame] | 40 | syn match vimCommand contained "\<z[-+^.=]\=\>" |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 41 | 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] | 42 | |
| 43 | " vimOptions are caught only when contained in a vimSet {{{2 |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 44 | " GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' |
| 45 | 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 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 |
| 46 | syn keyword vimOption contained 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 et expandtab ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase skipwhite nextgroup=vimSetEqual,vimSetMod |
| 47 | syn keyword vimOption contained ft filetype fcs fillchars 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 imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc skipwhite nextgroup=vimSetEqual,vimSetMod |
| 48 | syn keyword vimOption contained imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode 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 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 msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus skipwhite nextgroup=vimSetEqual,vimSetMod |
| 49 | syn keyword vimOption contained 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 pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions skipwhite nextgroup=vimSetEqual,vimSetMod |
| 50 | syn keyword vimOption contained 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 scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang skipwhite nextgroup=vimSetEqual,vimSetMod |
| 51 | syn keyword vimOption contained 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 titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype skipwhite nextgroup=vimSetEqual,vimSetMod |
| 52 | syn keyword vimOption contained 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 xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 53 | |
| 54 | " vimOptions: These are the turn-off setting variants {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 55 | " GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR='' |
| 56 | 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 |
| 57 | 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] | 58 | 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 |
| 59 | syn keyword vimOption contained nowb nowritebackup noxtermcodes |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 60 | |
| 61 | " vimOptions: These are the invertible variants {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 62 | " GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR='' |
| 63 | 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 |
| 64 | 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 |
| 65 | 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] | 66 | 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] | 67 | |
| 68 | " termcap codes (which can also be set) {{{2 |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 69 | " GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' |
| 70 | 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] | 71 | " term key codes |
| 72 | 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] | 73 | syn match vimOption contained "t_%1" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 74 | syn match vimOption contained "t_#2" |
| 75 | syn match vimOption contained "t_#4" |
Bram Moolenaar | 6d5ad4c | 2016-10-27 17:00:16 +0200 | [diff] [blame] | 76 | syn match vimOption contained "t_@7" |
Bram Moolenaar | b0d45e7 | 2017-11-05 18:19:24 +0100 | [diff] [blame] | 77 | syn match vimOption contained "t_*7" |
| 78 | syn match vimOption contained "t_&8" |
| 79 | syn match vimOption contained "t_%i" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 80 | syn match vimOption contained "t_k;" |
| 81 | |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 82 | " 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] | 83 | " GEN_SYN_VIM: Missing vimOption, START_STR='syn keyword vimErrSetting contained', END_STR='' |
| 84 | 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 |
| 85 | 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 |
| 86 | 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] | 87 | |
Bram Moolenaar | 80a94a5 | 2006-02-23 21:26:58 +0000 | [diff] [blame] | 88 | " AutoCmd Events {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 89 | syn case ignore |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 90 | " GEN_SYN_VIM: vimAutoEvent, START_STR='syn keyword vimAutoEvent contained', END_STR='' |
Doug Kearns | e85fdc7 | 2024-07-07 20:45:37 +0200 | [diff] [blame] | 91 | 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 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 FilterWritePost |
Ernie Rael | 0512425 | 2024-07-11 22:10:45 +0200 | [diff] [blame] | 92 | syn keyword vimAutoEvent contained 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 TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TermResponseAll TextChanged TextChangedI TextChangedP TextChangedT TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinNewPre WinResized WinScrolled |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 93 | |
| 94 | " Highlight commonly used Groupnames {{{2 |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 95 | 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] | 96 | |
| 97 | " Default highlighting groups {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 98 | " GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR='' |
dkearns | a3bddb7 | 2024-06-14 01:48:10 +1000 | [diff] [blame] | 99 | syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel 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] | 100 | syn match vimHLGroup contained "\<Conceal\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 101 | syn case match |
| 102 | |
| 103 | " Function Names {{{2 |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 104 | " GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR='' |
Doug Kearns | e85fdc7 | 2024-07-07 20:45:37 +0200 | [diff] [blame] | 105 | 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 bindtextdomain blob2list 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 char2nr charclass charcol charidx |
| 106 | syn keyword vimFuncName contained chdir cindent clearmatches col complete complete_add complete_check complete_info 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 get getbufinfo getbufline getbufoneline getbufvar getcellwidths getchangelist |
Ernie Rael | 0512425 | 2024-07-11 22:10:45 +0200 | [diff] [blame] | 107 | syn keyword vimFuncName contained getchar getcharmod getcharpos getcharsearch getcharstr getcmdcompltype getcmdline getcmdpos 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 gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname iconv id indent index indexof input inputdialog inputlist inputrestore inputsave inputsecret |
Doug Kearns | e85fdc7 | 2024-07-07 20:45:37 +0200 | [diff] [blame] | 108 | syn keyword vimFuncName contained 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 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 nr2char or pathshorten perleval popup_atcursor popup_beval popup_clear popup_close popup_create popup_dialog popup_filter_menu popup_filter_yesno |
| 109 | syn keyword vimFuncName contained 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 reltimefloat reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remote_startserver remove rename repeat resolve reverse round |
| 110 | syn keyword vimFuncName contained 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 sound_playfile sound_stop soundfold spellbadword spellsuggest split sqrt srand state str2float str2list str2nr strcharlen strcharpart strchars |
| 111 | syn keyword vimFuncName contained 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 term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon |
| 112 | syn keyword vimFuncName contained 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_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 type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview |
| 113 | syn keyword vimFuncName contained winwidth wordcount writefile xor |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 114 | |
Bram Moolenaar | ac7bd63 | 2013-03-19 11:35:58 +0100 | [diff] [blame] | 115 | "--- syntax here and above generated by mkvimvim --- |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 116 | " Special Vim Highlighting (not automatic) {{{1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 117 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 118 | " Set up commands for this syntax highlighting file {{{2 |
| 119 | |
| 120 | com! -nargs=* Vim9 execute <q-args> s:vim9script ? "" : "contained" |
| 121 | com! -nargs=* VimL execute <q-args> s:vim9script ? "contained" : "" |
| 122 | |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 123 | if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhHlmpPrt]' |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 124 | if g:vimsyn_folding =~# 'a' |
| 125 | com! -nargs=* VimFolda <args> fold |
| 126 | else |
| 127 | com! -nargs=* VimFolda <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 128 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 129 | if g:vimsyn_folding =~# 'f' |
| 130 | com! -nargs=* VimFoldf <args> fold |
| 131 | else |
| 132 | com! -nargs=* VimFoldf <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 133 | endif |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 134 | if g:vimsyn_folding =~# 'h' |
| 135 | com! -nargs=* VimFoldh <args> fold |
| 136 | else |
| 137 | com! -nargs=* VimFoldh <args> |
| 138 | endif |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 139 | if g:vimsyn_folding =~# 'H' |
| 140 | com! -nargs=* VimFoldH <args> fold |
| 141 | else |
| 142 | com! -nargs=* VimFoldH <args> |
| 143 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 144 | if g:vimsyn_folding =~# 'l' |
| 145 | com! -nargs=* VimFoldl <args> fold |
| 146 | else |
| 147 | com! -nargs=* VimFoldl <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 148 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 149 | if g:vimsyn_folding =~# 'm' |
| 150 | com! -nargs=* VimFoldm <args> fold |
| 151 | else |
| 152 | com! -nargs=* VimFoldm <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 153 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 154 | if g:vimsyn_folding =~# 'p' |
| 155 | com! -nargs=* VimFoldp <args> fold |
| 156 | else |
| 157 | com! -nargs=* VimFoldp <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 158 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 159 | if g:vimsyn_folding =~# 'P' |
| 160 | com! -nargs=* VimFoldP <args> fold |
| 161 | else |
| 162 | com! -nargs=* VimFoldP <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 163 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 164 | if g:vimsyn_folding =~# 'r' |
| 165 | com! -nargs=* VimFoldr <args> fold |
| 166 | else |
| 167 | com! -nargs=* VimFoldr <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 168 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 169 | if g:vimsyn_folding =~# 't' |
| 170 | com! -nargs=* VimFoldt <args> fold |
| 171 | else |
| 172 | com! -nargs=* VimFoldt <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 173 | endif |
| 174 | else |
| 175 | com! -nargs=* VimFolda <args> |
| 176 | com! -nargs=* VimFoldf <args> |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 177 | com! -nargs=* VimFoldh <args> |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 178 | com! -nargs=* VimFoldH <args> |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 179 | com! -nargs=* VimFoldl <args> |
| 180 | com! -nargs=* VimFoldm <args> |
| 181 | com! -nargs=* VimFoldp <args> |
| 182 | com! -nargs=* VimFoldP <args> |
| 183 | com! -nargs=* VimFoldr <args> |
| 184 | com! -nargs=* VimFoldt <args> |
| 185 | endif |
| 186 | |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 187 | " Deprecated variable options {{{2 |
| 188 | if exists("g:vim_minlines") |
| 189 | let g:vimsyn_minlines= g:vim_minlines |
| 190 | endif |
| 191 | if exists("g:vim_maxlines") |
| 192 | let g:vimsyn_maxlines= g:vim_maxlines |
| 193 | endif |
| 194 | if exists("g:vimsyntax_noerror") |
| 195 | let g:vimsyn_noerror= g:vimsyntax_noerror |
| 196 | endif |
| 197 | |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 198 | " Variable options {{{2 |
| 199 | if exists("g:vim_maxlines") |
| 200 | let s:vimsyn_maxlines= g:vim_maxlines |
| 201 | else |
| 202 | let s:vimsyn_maxlines= 60 |
| 203 | endif |
| 204 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 205 | " Nulls {{{2 |
| 206 | " ===== |
| 207 | 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 |
| 208 | |
| 209 | " Booleans {{{2 |
| 210 | " ======== |
| 211 | Vim9 syn keyword vim9Boolean true false |
| 212 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 213 | " Numbers {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 214 | " ======= |
dkearns | 5cd86c6 | 2024-03-12 07:40:58 +1100 | [diff] [blame] | 215 | syn case ignore |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 216 | syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment |
| 217 | syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment |
| 218 | syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment |
| 219 | syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment |
| 220 | syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment |
| 221 | syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment |
| 222 | syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment |
dkearns | 5cd86c6 | 2024-03-12 07:40:58 +1100 | [diff] [blame] | 223 | syn case match |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 224 | |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 225 | " All vimCommands are contained by vimIsCommand. {{{2 |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 226 | syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimMatch,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 227 | syn cluster vim9CmdList contains=vim9Const,vim9Final,vim9For,vim9Var |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 228 | syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 |
dkearns | 9c5b90d | 2024-01-24 06:34:28 +1100 | [diff] [blame] | 229 | syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 230 | syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 231 | syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 232 | syn match vimVar "\s\zs&\%([lg]:\)\=\a\+\>" |
| 233 | syn match vimVar "\s\zs&t_\S[a-zA-Z0-9]\>" |
| 234 | syn match vimVar "\s\zs&t_k;" |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 235 | syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 236 | syn keyword vimCommand contained in |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 237 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 238 | syn cluster vimExprList contains=vimEnvvar,vimFunc,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar,@vim9ExprList |
| 239 | syn cluster vim9ExprList contains=vim9Boolean,vim9Null |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 240 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 241 | " Insertions And Appends: insert append {{{2 |
Bram Moolenaar | 519cc55 | 2021-11-16 19:18:26 +0000 | [diff] [blame] | 242 | " (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] | 243 | " ======================= |
Bram Moolenaar | 519cc55 | 2021-11-16 19:18:26 +0000 | [diff] [blame] | 244 | if &buftype != 'nofile' |
dkearns | 4ba70ca | 2024-04-15 04:32:56 +1000 | [diff] [blame] | 245 | syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$" extend |
| 246 | syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$" extend |
| 247 | 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] | 248 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 249 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 250 | " Behave! {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 251 | " ======= |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 252 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror") |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 253 | syn match vimBehaveError contained "[^ ]\+" |
| 254 | endif |
Doug Kearns | fe6d5b0 | 2024-02-14 21:17:43 +0100 | [diff] [blame] | 255 | syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vimBehaveError skipwhite |
| 256 | syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite |
| 257 | syn keyword vimBehaveModel contained mswin xterm |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 258 | |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 259 | " Call {{{2 |
| 260 | " ==== |
| 261 | syn match vimCall "\<call\=\>" skipwhite nextgroup=vimFunc |
| 262 | |
dkearns | a3bddb7 | 2024-06-14 01:48:10 +1000 | [diff] [blame] | 263 | " Exception Handling {{{2 |
| 264 | syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList |
| 265 | syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern |
| 266 | syn region vimCatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline |
| 267 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 268 | " Filetypes {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 269 | " ========= |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 270 | 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] | 271 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError") |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 272 | syn match vimFTError contained "\I\i*" |
| 273 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 274 | syn keyword vimFTCmd contained filet[ype] |
| 275 | syn keyword vimFTOption contained detect indent off on plugin |
| 276 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 277 | " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 278 | " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 279 | syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 280 | syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 281 | if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 282 | syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 283 | else |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 284 | syn region vimAugroup start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 285 | endif |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 286 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror") |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 287 | syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 288 | endif |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 289 | |
| 290 | syn match vimAutoCmdGroup contained "\S\+" |
| 291 | syn match vimAugroupEnd contained "\c\<END\>" |
| 292 | syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAutoCmdGroup |
| 293 | syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup,vimAugroupEnd |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 294 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 295 | " Operators: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 296 | " ========= |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 297 | syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vimNull |
| 298 | syn match vimOper "||\|&&\|[-+*/%.!]" skipwhite nextgroup=vimString,vimSpecFile |
Bram Moolenaar | 113cb51 | 2021-11-07 20:27:04 +0000 | [diff] [blame] | 299 | syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile |
| 300 | syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile |
dkearns | 76d6298 | 2024-03-23 05:55:25 +1100 | [diff] [blame] | 301 | syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup |
Bram Moolenaar | 4072ba5 | 2020-12-23 13:56:35 +0100 | [diff] [blame] | 302 | syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 303 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 304 | syn match vimOperError ")" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 305 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 306 | |
dkearns | 4ba70ca | 2024-04-15 04:32:56 +1000 | [diff] [blame] | 307 | " 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] | 308 | " ========= |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 309 | syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag |
| 310 | syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag |
dkearns | 4ba70ca | 2024-04-15 04:32:56 +1000 | [diff] [blame] | 311 | |
| 312 | syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 313 | syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet |
| 314 | syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 315 | |
| 316 | syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList |
| 317 | syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey |
| 318 | syn match vimDef "\<def\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimDefKey |
| 319 | |
| 320 | syn match vimFunction "\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimFuncList skipwhite nextgroup=vimFuncParams |
| 321 | syn match vimDef "\<def\s\+new\%(\i\|{.\{-1,}}\)\+" contains=@vimDefList nextgroup=vimDefParams |
Aliaksei Budavei | 80aabaa | 2024-03-31 19:26:32 +0300 | [diff] [blame] | 322 | syn match vimDef "\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+" contains=@vimDefList,vimMethodName nextgroup=vimDefParams |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 323 | |
| 324 | syn match vimFuncComment contained +".*+ skipwhite skipnl nextgroup=vimFuncBody,vimEndfunction |
| 325 | syn match vimDefComment contained "#.*" skipwhite skipnl nextgroup=vimDefBody,vimEnddef |
| 326 | |
| 327 | syn match vimFuncBang contained "!" |
| 328 | syn match vimFuncSID contained "\c<sid>" |
| 329 | syn match vimFuncSID contained "\<[sg]:" |
| 330 | syn keyword vimFuncKey contained fu[nction] |
| 331 | syn keyword vimDefKey contained def |
Aliaksei Budavei | 80aabaa | 2024-03-31 19:26:32 +0300 | [diff] [blame] | 332 | syn keyword vimMethodName contained empty len string |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 333 | |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 334 | syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,@vimContinue |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 335 | syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 336 | syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals |
| 337 | syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals |
| 338 | |
| 339 | syn match vimFuncParamEquals contained "=" skipwhite nextgroup=@vimExprList |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 340 | syn match vimFuncMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 341 | |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 342 | syn region vimFuncBody contained start="^.\=" matchgroup=vimCommand end="\<endfu\%[nction]\>" contains=@vimFuncBodyList skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError |
| 343 | syn region vimDefBody contained start="^.\=" matchgroup=vimCommand end="\<enddef\>" contains=@vimDefBodyList skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 344 | |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 345 | syn match vimEndfunction "\<endf\%[unction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError |
| 346 | syn match vimEnddef "\<enddef\>" skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 347 | |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 348 | if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' |
dkearns | 4ba70ca | 2024-04-15 04:32:56 +1000 | [diff] [blame] | 349 | syn region vimFuncFold start="^\s*:\=\s*fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="^\s*:\=\s*endf\%[unction]\>" contains=vimFunction fold keepend extend transparent |
| 350 | syn region vimFuncFold start="^\s*:\=\s*def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="^\s*:\=\s*enddef\>" contains=vimDef fold keepend extend transparent |
| 351 | syn region vimFuncFold start="^\s*:\=\s*def\s\+new\i\+(" end="^\s*:\=\s*enddef\>" contains=vimDef fold keepend extend transparent |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 352 | endif |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 353 | |
| 354 | syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>" |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 355 | syn match vimFuncBlank contained "\s\+" |
| 356 | |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 357 | " Types: {{{2 |
| 358 | " ===== |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 359 | |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 360 | syn region vimReturnType contained start=":\s" end="$" matchgroup=vim9Comment end="\ze[#"]" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef,vimCommentError contains=vimTypeSep transparent |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 361 | syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType contains=vimTypeSep |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 362 | |
| 363 | syn match vimTypeSep contained ":\s\@=" skipwhite nextgroup=@vimType |
| 364 | syn keyword vimType contained any blob bool channel float job number string void |
| 365 | syn match vimType contained "\<func\>" |
| 366 | syn region vimCompoundType contained matchgroup=vimType start="\<func(" end=")" nextgroup=vimTypeSep contains=@vimType oneline transparent |
| 367 | syn region vimCompoundType contained matchgroup=vimType start="\<\%(list\|dict\)<" end=">" contains=@vimType oneline transparent |
| 368 | syn match vimUserType contained "\<\u\w*\>" |
| 369 | |
| 370 | syn cluster vimType contains=vimType,vimCompoundType,vimUserType |
Bram Moolenaar | 4d8f476 | 2021-06-27 15:18:56 +0200 | [diff] [blame] | 371 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 372 | " Keymaps: {{{2 |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 373 | " ======= |
| 374 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 375 | syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,@vimKeymapLineComment |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 376 | syn match vimKeymapLhs "\S\+" contained skipwhite nextgroup=vimKeymapRhs contains=vimNotation |
| 377 | syn match vimKeymapRhs "\S\+" contained skipwhite nextgroup=vimKeymapTailComment contains=vimNotation |
| 378 | syn match vimKeymapTailComment "\S.*" contained |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 379 | |
| 380 | " TODO: remove when :" comment is matched in parts as "ex-colon comment" --djk |
| 381 | if s:vim9script |
| 382 | syn match vim9KeymapLineComment "#.*" contained contains=@vimCommentGroup,vimCommentString,vim9CommentTitle |
| 383 | else |
| 384 | syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle |
| 385 | endif |
| 386 | syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 387 | |
| 388 | syn region vimKeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$" contains=vimKeymapStart |
| 389 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 390 | " Special Filenames, Modifiers, Extension Removal: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 391 | " =============================================== |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 392 | syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst1 |
| 393 | syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst1 |
| 394 | syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1 |
| 395 | syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst1 |
| 396 | syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst1 |
| 397 | syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst1 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 398 | syn match vimSpecFileMod "\(:[phtre]\)\+" contained |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 399 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 400 | " User-Specified Commands: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 401 | " ======================= |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 402 | syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,@vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 403 | syn keyword vimUserCommand contained com[mand] |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 404 | syn match vimUserCmdName contained "\<\u\w*\>" nextgroup=vimUserCmdBlock skipwhite |
| 405 | syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter,vimCmdBlock,vimUserCmdName |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 406 | syn match vimUserAttrbError contained "-\a\+\ze\s" |
| 407 | syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper |
| 408 | syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError |
| 409 | syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey |
| 410 | syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey |
| 411 | syn match vimUserAttrb contained "-bang\>" contains=vimOper,vimUserAttrbKey |
| 412 | syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey |
| 413 | syn match vimUserAttrb contained "-buffer\>" contains=vimOper,vimUserAttrbKey |
| 414 | syn match vimUserAttrb contained "-register\>" contains=vimOper,vimUserAttrbKey |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 415 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 416 | syn match vimUserCmdError contained "\S\+\>" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 417 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 418 | syn case ignore |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 419 | syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister] |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 420 | " GEN_SYN_VIM: vimUserAttrbCmplt, START_STR='syn keyword vimUserAttrbCmplt contained', END_STR='' |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 421 | syn keyword vimUserAttrbCmplt 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 sign syntax syntime tag tag_listfiles user var |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 422 | syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError |
Maxim Kim | ceed368 | 2024-01-09 05:42:02 +1100 | [diff] [blame] | 423 | syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%([.#]\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError |
Bram Moolenaar | a93fa7e | 2006-04-17 22:14:47 +0000 | [diff] [blame] | 424 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 425 | syn case match |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 426 | syn match vimUserAttrbCmplt contained "custom,\u\w*" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 427 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 428 | syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList |
| 429 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 430 | " Lower Priority Comments: after some vim commands... {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 431 | " ======================= |
dkearns | 959c3c8 | 2024-06-12 04:18:08 +1000 | [diff] [blame] | 432 | if get(g:, "vimsyn_comment_strings", 1) |
| 433 | syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' |
| 434 | endif |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 435 | |
| 436 | if s:vim9script |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 437 | syn cluster vimComment contains=vim9Comment |
| 438 | else |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 439 | syn cluster vimComment contains=vimComment |
| 440 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 441 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 442 | VimL syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString |
| 443 | VimL syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString |
| 444 | VimL syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString |
| 445 | " Vim9 comments - TODO: might be highlighted while they don't work |
| 446 | Vim9 syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString |
| 447 | Vim9 syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString |
| 448 | Vim9 syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString |
| 449 | " Vim9 comment inside expression |
| 450 | Vim9 syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString contained |
| 451 | Vim9 syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString contained |
| 452 | Vim9 syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString contained |
| 453 | |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 454 | syn match vim9CommentError contained "#.*" |
| 455 | syn match vimCommentError contained +".*+ |
| 456 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 457 | " Environment Variables: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 458 | " ===================== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 459 | syn match vimEnvvar "\$\I\i*" |
| 460 | syn match vimEnvvar "\${\I\i*}" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 461 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 462 | " In-String Specials: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 463 | " Try to catch strings, if nothing else matches (therefore it must precede the others!) |
| 464 | " vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside []) |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 465 | syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1 |
| 466 | syn match vimPatSepErr contained "\\)" |
| 467 | syn match vimPatSep contained "\\|" |
Bram Moolenaar | b730f0c | 2018-11-25 03:56:26 +0100 | [diff] [blame] | 468 | 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] | 469 | syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline |
| 470 | syn match vimNotPatSep contained "\\\\" |
Bram Moolenaar | 6ba83ba | 2022-06-12 22:15:57 +0100 | [diff] [blame] | 471 | syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 472 | syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup |
Bram Moolenaar | b0d45e7 | 2017-11-05 18:19:24 +0100 | [diff] [blame] | 473 | syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+ |
Bram Moolenaar | acc2240 | 2020-06-07 21:07:18 +0200 | [diff] [blame] | 474 | "syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 475 | syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont |
| 476 | syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ |
Bram Moolenaar | 6ba83ba | 2022-06-12 22:15:57 +0100 | [diff] [blame] | 477 | syn match vimEscape contained "\\." |
dkearns | e3e3934 | 2024-02-02 07:44:26 +1100 | [diff] [blame] | 478 | " syn match vimEscape contained +\\[befnrt\"]+ |
| 479 | syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}" |
| 480 | syn match vimEscape contained "\\<" contains=vimNotation |
| 481 | syn match vimEscape contained "\\<\*[^>]*>\=>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 482 | |
Doug Kearns | d164f2a | 2024-08-16 21:07:15 +0200 | [diff] [blame] | 483 | syn region vimString oneline start=+$'+ skip=+''+ end=+'+ contains=@vimStringInterpolation |
| 484 | syn region vimString oneline start=+$"+ end=+"+ contains=@vimStringGroup,@vimStringInterpolation |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 485 | syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList |
| 486 | syn match vimStringInterpolationBrace contained "{{" |
| 487 | syn match vimStringInterpolationBrace contained "}}" |
Doug Kearns | d164f2a | 2024-08-16 21:07:15 +0200 | [diff] [blame] | 488 | syn cluster vimStringInterpolation contains=vimStringInterpolationExpr,vimStringInterpolationBrace |
thinca | cf8695d | 2024-01-28 18:57:23 +0100 | [diff] [blame] | 489 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 490 | " Substitutions: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 491 | " ============= |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 492 | syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation |
| 493 | syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation |
| 494 | syn cluster vimSubstList add=vimCollection |
Doug Kearns | 92f4e91 | 2024-06-05 19:45:43 +0200 | [diff] [blame] | 495 | syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat |
| 496 | syn match vimSubst "^\s*\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat |
| 497 | syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat |
| 498 | syn match vimSubst1 contained "\%(s\%[ubstitute]\|sm\%[agic]\>\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 499 | " TODO: Vim9 illegal separators for abbreviated :s form are [-.:], :su\%[...] required |
| 500 | " : # is allowed but "not recommended" (see :h pattern-delimiter) |
| 501 | 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 |
| 502 | syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline |
| 503 | syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass |
| 504 | syn match vimCollClassErr contained "\[:.\{-\}:\]" |
| 505 | syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]" |
| 506 | syn match vimSubstSubstr contained "\\z\=\d" |
| 507 | syn match vimSubstTwoBS contained "\\\\" |
| 508 | syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags |
| 509 | syn match vimSubstFlags contained "[&cegiIlnpr#]\+" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 510 | |
Doug Kearns | 92f4e91 | 2024-06-05 19:45:43 +0200 | [diff] [blame] | 511 | " Vi compatibility |
| 512 | syn match vimSubstDelim contained "\\" |
| 513 | syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4 |
| 514 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 515 | " 'String': {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 516 | syn match vimString "[^(,]'[^']\{-}\zs'" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 517 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 518 | " Marks, Registers, Addresses, Filters: {{{2 |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 519 | syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 520 | syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 521 | syn match vimMark ",\zs'[<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 522 | syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 523 | syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 |
| 524 | syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst1 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 525 | syn match vimPlainMark contained "'[a-zA-Z0-9]" |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 526 | 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] | 527 | |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 528 | 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] | 529 | syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]' |
| 530 | syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]' |
| 531 | syn match vimRegister '@"' |
| 532 | syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]' |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 533 | syn match vimLetRegister contained '@["0-9\-a-zA-Z#=*+_/]' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 534 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 535 | syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1 |
| 536 | syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 537 | |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 538 | syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile |
Bram Moolenaar | d58a3bf | 2020-09-28 21:48:16 +0200 | [diff] [blame] | 539 | syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile |
| 540 | syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 541 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 542 | " Complex Repeats: (:h complex-repeat) {{{2 |
| 543 | " =============== |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 544 | syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 |
| 545 | syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 546 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 547 | " Set command and associated set-options (vimOptions) with comment {{{2 |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 548 | syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetRegion |
| 549 | syn region vimSetRegion contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap |
| 550 | syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\\\\|\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep |
| 551 | syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap |
| 552 | syn keyword vimSetAll contained all nextgroup=vimSetMod |
| 553 | syn keyword vimSetTermcap contained termcap |
| 554 | syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar |
Bram Moolenaar | 4072ba5 | 2020-12-23 13:56:35 +0100 | [diff] [blame] | 555 | syn match vimSetSep contained "[,:]" |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 556 | syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 557 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 558 | " Variable Declarations: {{{2 |
| 559 | " ===================== |
| 560 | VimL syn keyword vimLet let skipwhite nextgroup=vimVar,vimFuncVar,vimLetRegister,vimVarList |
| 561 | VimL syn keyword vimConst cons[t] skipwhite nextgroup=vimVar,vimVarList |
| 562 | syn region vimVarList contained start="\[" end="]" contains=vimVar,@vimContinue |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 563 | |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 564 | VimL syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 565 | syn match vimUnletBang contained "!" skipwhite nextgroup=vimUnletVars |
| 566 | syn region vimUnletVars contained start="$\I\|\h" skip="\n\s*\\" end="$" end="|" contains=vimVar,vimEnvvar,vimContinue,vimString,vimNumber |
| 567 | |
Doug Kearns | 7884cc7 | 2024-08-23 18:01:35 +0200 | [diff] [blame] | 568 | 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] | 569 | 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] | 570 | 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] | 571 | 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] | 572 | |
| 573 | Vim9 syn keyword vim9Const const skipwhite nextgroup=vim9Variable,vim9VariableList |
| 574 | Vim9 syn keyword vim9Final final skipwhite nextgroup=vim9Variable,vim9VariableList |
| 575 | Vim9 syn keyword vim9Var var skipwhite nextgroup=vim9Variable,vim9VariableList |
| 576 | |
| 577 | syn match vim9Variable contained "\<\h\w*\>" skipwhite nextgroup=vimTypeSep,vimLetHereDoc |
| 578 | syn region vim9VariableList contained start="\[" end="]" contains=vim9Variable,@vimContinue |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 579 | |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 580 | " For: {{{2 |
| 581 | " === |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 582 | if s:vim9script |
| 583 | syn keyword vim9For for skipwhite nextgroup=vim9Variable,vim9VariableList |
| 584 | else |
| 585 | syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList |
| 586 | endif |
dkearns | 76d6298 | 2024-03-23 05:55:25 +1100 | [diff] [blame] | 587 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 588 | " Abbreviations: {{{2 |
Bram Moolenaar | e37d50a | 2008-08-06 17:06:04 +0000 | [diff] [blame] | 589 | " ============= |
h-east | 9b53c05 | 2024-02-13 21:09:22 +0100 | [diff] [blame] | 590 | " 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] | 591 | 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] | 592 | " GEN_SYN_VIM: vimCommand abclear, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod' |
| 593 | syn keyword vimAbb abc[lear] cabc[lear] iabc[lear] skipwhite nextgroup=vimMapMod |
Bram Moolenaar | e37d50a | 2008-08-06 17:06:04 +0000 | [diff] [blame] | 594 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 595 | " Autocmd: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 596 | " ======= |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 597 | syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace |
| 598 | syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 599 | syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod,vimAutoCmdBlock |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 600 | syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 601 | syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" skipwhite nextgroup=vimAutoCmdBlock |
| 602 | syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 603 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 604 | " Echo And Execute: -- prefer strings! {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 605 | " ================ |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 606 | " NOTE: No trailing comments |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 607 | |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 608 | syn region vimEcho |
| 609 | \ matchgroup=vimCommand |
| 610 | \ start="\<ec\%[ho]\>" |
| 611 | \ start="\<echoe\%[rr]\>" |
| 612 | \ start="\<echom\%[sg]\>" |
| 613 | \ start="\<echoc\%[onsole]\>" |
| 614 | \ start="\<echon\>" |
| 615 | \ start="\<echow\%[indow]\>" |
| 616 | \ skip=+\\|\|\n\s*\\\|\n\s*"\\ + |
| 617 | \ matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent |
| 618 | |
| 619 | syn match vimEchohl "\<echohl\=\>" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 620 | syn case ignore |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 621 | syn keyword vimEchohlNone contained none |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 622 | syn case match |
| 623 | |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 624 | syn cluster vimEcho contains=vimEcho,vimEchohl |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 625 | |
| 626 | 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] | 627 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 628 | " Maps: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 629 | " ==== |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 630 | " GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' |
| 631 | 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 |
| 632 | syn match vimMap "\<map\>" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
| 633 | syn keyword vimMap no[remap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
dkearns | 1624970 | 2024-02-23 05:45:05 +1100 | [diff] [blame] | 634 | " GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod' |
| 635 | 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] | 636 | syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod |
| 637 | " GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' |
| 638 | 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 |
| 639 | syn keyword vimUnmap unm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
| 640 | |
dkearns | 5d67aef | 2024-03-10 04:01:22 +1100 | [diff] [blame] | 641 | syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation skipwhite nextgroup=vimMapRhs |
| 642 | syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation skipwhite skipnl nextgroup=vimMapRhsContinue |
| 643 | syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 644 | syn match vimMapMod contained "\%#=1\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs |
dkearns | 5d67aef | 2024-03-10 04:01:22 +1100 | [diff] [blame] | 645 | syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation skipnl nextgroup=vimMapRhsContinue |
| 646 | " assume a continuation comment introduces the RHS |
| 647 | syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 648 | syn case ignore |
Bram Moolenaar | b4ff518 | 2015-11-10 21:15:48 +0100 | [diff] [blame] | 649 | syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 650 | syn case match |
| 651 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 652 | " Menus: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 653 | " ===== |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 654 | " NOTE: tail comments disallowed |
| 655 | " GEN_SYN_VIM: vimCommand menu, START_STR='syn keyword vimMenu', END_STR='skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus' |
| 656 | 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 |
| 657 | syn keyword vimMenu popu[p] skipwhite nextgroup=vimMenuBang,vimMenuName |
| 658 | syn region vimMenuRhs contained contains=@vimContinue,vimNotation start="|\@!\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + end="$" matchgroup=vimSep end="|" |
| 659 | 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] | 660 | syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs |
| 661 | 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] | 662 | syn match vimMenuNotation "&\a\|&&\|\\\s\|\\\." contained |
| 663 | syn match vimMenuPriority "\<\d\+\%(\.\d\+\)*\>" contained skipwhite nextgroup=vimMenuName |
| 664 | syn match vimMenuMod "\c<\%(script\|silent\|special\)>" contained skipwhite nextgroup=vimMenuName,vimMenuPriority,vimMenuMod contains=vimMapModKey,vimMapModErr |
| 665 | syn keyword vimMenuStatus enable disable nextgroup=vimMenuName skipwhite |
| 666 | syn match vimMenuBang "\a\@1<=!" contained skipwhite nextgroup=vimMenuName,vimMenuMod |
| 667 | |
| 668 | syn region vimMenutranslate |
| 669 | \ matchgroup=vimCommand start="\<menut\%[ranslate]\>" |
| 670 | \ skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + |
| 671 | \ end="$" matchgroup=vimCmdSep end="|" matchgroup=vimMenuClear end="\<clear\ze\s*\%(["#|]\|$\)" |
| 672 | \ contains=@vimContinue,vimMenutranslateName keepend transparent |
| 673 | " oneline is sufficient to match the current formatting in runtime/lang/*.vim |
| 674 | syn match vimMenutranslateName "\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation |
| 675 | syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 676 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 677 | " Angle-Bracket Notation: (tnx to Michael Geddes) {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 678 | " ====================== |
| 679 | syn case ignore |
dkearns | e3e3934 | 2024-02-02 07:44:26 +1100 | [diff] [blame] | 680 | syn match vimNotation "\%#=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 |
| 681 | |
| 682 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket |
| 683 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket |
| 684 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket |
| 685 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket |
| 686 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket |
| 687 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket |
| 688 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket |
| 689 | |
| 690 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket |
| 691 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket |
| 692 | syn match vimNotation '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket |
| 693 | syn match vimNotation '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket |
| 694 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket |
| 695 | syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket |
| 696 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 697 | syn match vimBracket contained "[\\<>]" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 698 | syn case match |
| 699 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 700 | " User Function Highlighting: {{{2 |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 701 | " (following Gautam Iyer's suggestion) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 702 | " ========================== |
dkearns | b4b3d7d | 2024-03-16 04:53:53 +1100 | [diff] [blame] | 703 | syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute |
Aliaksei Budavei | 80aabaa | 2024-03-31 19:26:32 +0300 | [diff] [blame] | 704 | syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation,vimMethodName |
dkearns | b4b3d7d | 2024-03-16 04:53:53 +1100 | [diff] [blame] | 705 | syn keyword vimFuncEcho contained ec ech echo |
| 706 | |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 707 | syn match vimMap "\<map\%(\s\+(\)\@=" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs |
| 708 | |
Bram Moolenaar | 2547aa9 | 2020-07-26 17:00:44 +0200 | [diff] [blame] | 709 | " User Command Highlighting: {{{2 |
Bram Moolenaar | d2ea7cf | 2021-05-30 20:54:13 +0200 | [diff] [blame] | 710 | syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!' |
Bram Moolenaar | 2547aa9 | 2020-07-26 17:00:44 +0200 | [diff] [blame] | 711 | |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 712 | " Errors And Warnings: {{{2 |
| 713 | " ==================== |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 714 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") |
Aliaksei Budavei | dfcef89 | 2024-02-18 21:02:14 +0300 | [diff] [blame] | 715 | " TODO: The new-prefix exception should only apply to constructor definitions. |
Aliaksei Budavei | 80aabaa | 2024-03-31 19:26:32 +0300 | [diff] [blame] | 716 | " TODO: The |builtin-object-methods| exception should only apply to method |
| 717 | " definitions. |
| 718 | syn match vimFunctionError "\s\zs\%(empty\|len\|new\|string\)\@![a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 719 | 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] | 720 | syn match vimElseIfErr "\<else\s\+if\>" |
| 721 | syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 722 | endif |
| 723 | |
Bram Moolenaar | f1dcd14 | 2022-12-31 15:30:45 +0000 | [diff] [blame] | 724 | syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation |
Bram Moolenaar | 6c1e157 | 2019-06-22 02:13:00 +0200 | [diff] [blame] | 725 | |
Doug Kearns | e85fdc7 | 2024-07-07 20:45:37 +0200 | [diff] [blame] | 726 | " Match: {{{2 |
| 727 | " ===== |
| 728 | syn match vimMatch "\<[23]\=mat\%[ch]\>" skipwhite nextgroup=vimMatchGroup,vimMatchNone |
| 729 | syn match vimMatchGroup contained "[[:alnum:]._-]\+" skipwhite nextgroup=vimMatchPattern |
| 730 | syn case ignore |
| 731 | syn keyword vimMatchNone contained none |
| 732 | syn case match |
| 733 | syn region vimMatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline |
| 734 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 735 | " Norm: {{{2 |
Bram Moolenaar | 05159a0 | 2005-02-26 23:04:13 +0000 | [diff] [blame] | 736 | " ==== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 737 | syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds |
| 738 | syn match vimNormCmds contained ".*$" |
Bram Moolenaar | 05159a0 | 2005-02-26 23:04:13 +0000 | [diff] [blame] | 739 | |
Doug Kearns | 262e25e | 2024-06-14 20:16:35 +0200 | [diff] [blame] | 740 | " Sleep: {{{2 |
| 741 | " ===== |
| 742 | syn keyword vimSleep sl[eep] skipwhite nextgroup=vimSleepBang,vimSleepArg |
| 743 | syn match vimSleepBang contained "\a\@1<=!" skipwhite nextgroup=vimSleepArg |
| 744 | syn match vimSleepArg contained "\<\%(\d\+\)\=m\=\>" |
| 745 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 746 | " Syntax: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 747 | "======= |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 748 | syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial |
| 749 | 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 |
| 750 | syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP |
| 751 | |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 752 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 753 | syn match vimSynError contained "\i\+" |
| 754 | syn match vimSynError contained "\i\+=" nextgroup=vimGroupList |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 755 | endif |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 756 | syn match vimSynContains contained "\<contain\%(s\|edin\)=" skipwhite skipnl nextgroup=vimGroupList |
| 757 | syn match vimSynKeyContainedin contained "\<containedin=" skipwhite skipnl nextgroup=vimGroupList |
| 758 | syn match vimSynNextgroup contained "\<nextgroup=" skipwhite skipnl nextgroup=vimGroupList |
dkearns | c79646d | 2024-01-05 08:58:48 +1100 | [diff] [blame] | 759 | if has("conceal") |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 760 | " no whitespace allowed after '=' |
dkearns | c79646d | 2024-01-05 08:58:48 +1100 | [diff] [blame] | 761 | syn match vimSynCchar contained "\<cchar=" nextgroup=vimSynCcharValue |
| 762 | syn match vimSynCcharValue contained "\S" |
| 763 | endif |
| 764 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 765 | syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,@vimComment |
Bram Moolenaar | d960d76 | 2011-09-21 19:22:10 +0200 | [diff] [blame] | 766 | syn cluster vimFuncBodyList add=vimSyntax |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 767 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 768 | " Syntax: case {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 769 | syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 770 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 771 | syn match vimSynCaseError contained "\i\+" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 772 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 773 | syn keyword vimSynCase contained ignore match |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 774 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 775 | " Syntax: clear {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 776 | syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 777 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 778 | " Syntax: cluster {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 779 | syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 780 | syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError |
| 781 | syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList |
| 782 | syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 783 | |
Brad King | d4634a2 | 2024-01-03 10:17:24 -0500 | [diff] [blame] | 784 | " Syntax: foldlevel {{{2 |
| 785 | syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError |
| 786 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldmethoderror") |
| 787 | syn match vimSynFoldMethodError contained "\i\+" |
| 788 | endif |
| 789 | syn keyword vimSynFoldMethod contained start minimum |
| 790 | |
Bram Moolenaar | 13d5aee | 2016-01-21 23:36:05 +0100 | [diff] [blame] | 791 | " Syntax: iskeyword {{{2 |
| 792 | syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimIskList |
| 793 | syn match vimIskList contained '\S\+' contains=vimIskSep |
| 794 | syn match vimIskSep contained ',' |
| 795 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 796 | " Syntax: include {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 797 | syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 798 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 799 | " Syntax: keyword {{{2 |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 800 | syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 801 | syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 802 | syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 803 | syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 804 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 805 | " Syntax: match {{{2 |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 806 | 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] | 807 | syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 808 | syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 809 | 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] | 810 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 811 | " Syntax: off and on {{{2 |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 812 | syn keyword vimSynType contained enable list manual off on reset |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 813 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 814 | " Syntax: region {{{2 |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 815 | syn cluster vimSynRegPatGroup contains=@vimContinue,vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation |
| 816 | syn cluster vimSynRegGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 817 | syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 818 | syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + end="|\|$" contains=@vimSynRegGroup |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 819 | 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] | 820 | syn match vimSynReg contained "\<\%(start\|skip\|end\)=" nextgroup=vimSynRegPat |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 821 | syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 822 | syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip=/\\\\\|\\\z1\|\n\s*\\\|\n\s*"\\ / end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 823 | syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" |
| 824 | 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] | 825 | syn match vimSynPatMod contained "lc=\d\+" |
| 826 | syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod |
| 827 | syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" |
| 828 | syn match vimSynNotPatRange contained "\\\\\|\\\[" |
| 829 | syn match vimMtchComment contained '"[^"]\+$' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 830 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 831 | " Syntax: sync {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 832 | " ============ |
Bram Moolenaar | df177f6 | 2005-02-22 08:39:57 +0000 | [diff] [blame] | 833 | syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 834 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 835 | syn match vimSyncError contained "\i\+" |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 836 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 837 | syn keyword vimSyncC contained ccomment clear fromstart |
| 838 | syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName |
| 839 | syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg |
| 840 | syn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber |
| 841 | syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat |
| 842 | syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 843 | syn match vimSyncGroupName contained "\h\w*" skipwhite nextgroup=vimSyncKey |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 844 | syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 845 | syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 846 | syn keyword vimSyncNone contained NONE |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 847 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 848 | " Additional IsCommand: here by reasons of precedence {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 849 | " ==================== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 850 | syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 851 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 852 | " Highlighting: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 853 | " ============ |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 854 | syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,@vimComment |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 855 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 856 | syn match vimHiCtermError contained "\D\i*" |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 857 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 858 | syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 859 | syn match vimHiBang contained "\a\@1<=!" skipwhite nextgroup=@vimHighlightCluster |
Bram Moolenaar | d960d76 | 2011-09-21 19:22:10 +0200 | [diff] [blame] | 860 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 861 | syn match vimHiGroup contained "\i\+" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 862 | syn case ignore |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 863 | 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] | 864 | syn keyword vimFgBgAttrib contained none bg background fg foreground |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 865 | syn case match |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 866 | syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib |
| 867 | syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 868 | syn case ignore |
Bram Moolenaar | d2ea7cf | 2021-05-30 20:54:13 +0200 | [diff] [blame] | 869 | 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] | 870 | syn match vimHiCtermColor contained "\<color\d\{1,3}\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 871 | |
| 872 | syn case match |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 873 | syn match vimHiFontname contained "[a-zA-Z\-*]\+" |
| 874 | syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" |
| 875 | syn match vimHiGuiRgb contained "#\x\{6}" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 876 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 877 | " Highlighting: hi group key=arg ... {{{2 |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 878 | syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 879 | 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] | 880 | if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 881 | syn match vimHiKeyError contained "\i\+="he=e-1 |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 882 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 883 | syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 884 | 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] | 885 | syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList |
Bram Moolenaar | 83d1b19 | 2015-04-13 14:22:40 +0200 | [diff] [blame] | 886 | 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] | 887 | syn match vimHiCtermul contained "\cctermul="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError |
PMunch | a606f3a | 2023-11-15 15:35:49 +0100 | [diff] [blame] | 888 | 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] | 889 | syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList |
| 890 | syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname |
| 891 | syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib |
| 892 | syn match vimHiTermcap contained "\S\+" contains=vimNotation |
Bram Moolenaar | 83d1b19 | 2015-04-13 14:22:40 +0200 | [diff] [blame] | 893 | syn match vimHiNmbr contained '\d\+' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 894 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 895 | " Highlight: clear {{{2 |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 896 | syn keyword vimHiClear contained clear skipwhite nextgroup=vimGroup,vimHiGroup |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 897 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 898 | " Highlight: link {{{2 |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 899 | " see tst24 (hi def vs hi) (Jul 06, 2018) |
| 900 | "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] | 901 | " TODO: simplify and allow line continuations --djk |
| 902 | 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] | 903 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 904 | " Control Characters: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 905 | " ================== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 906 | syn match vimCtrlChar "[--]" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 907 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 908 | " Beginners - Patterns that involve ^ {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 909 | " ========= |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 910 | Vim9 syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle |
| 911 | VimL syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle |
| 912 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 913 | 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] | 914 | 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] | 915 | |
dkearns | ae321b5 | 2024-06-15 23:06:17 +1000 | [diff] [blame] | 916 | " allowed anywhere in the file |
| 917 | if !s:vim9script |
| 918 | syn match vimShebangError "^\s*\zs#!.*" display |
| 919 | endif |
| 920 | syn match vimShebang "\%^#!.*" display |
| 921 | |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 922 | syn match vimContinue "^\s*\zs\\" |
dkearns | 059cbe8 | 2024-06-12 03:27:53 +1000 | [diff] [blame] | 923 | syn match vimContinueComment '^\s*\zs["#]\\ .*' |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 924 | syn cluster vimContinue contains=vimContinue,vimContinueComment |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 925 | syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue |
| 926 | syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 927 | syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 928 | |
Bram Moolenaar | 18144c8 | 2006-04-12 21:52:12 +0000 | [diff] [blame] | 929 | " Searches And Globals: {{{2 |
| 930 | " ==================== |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 931 | syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim |
| 932 | syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 933 | syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1 |
| 934 | 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] | 935 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 936 | " Vim9 Script Regions: {{{2 |
| 937 | " ================== |
| 938 | |
| 939 | if s:vim9script |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 940 | syn cluster vimLegacyTop contains=TOP,vim9LegacyHeader,vim9Comment,vim9LineComment |
| 941 | 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] | 942 | |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 943 | syn keyword vim9Vim9ScriptArg noclear contained |
| 944 | syn keyword vim9Vim9Script vim9s[cript] nextgroup=vim9Vim9ScriptArg skipwhite |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 945 | endif |
| 946 | |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 947 | " Embedded Scripts: {{{2 |
| 948 | " ================ |
| 949 | " perl,ruby : Benoit Cerrina |
| 950 | " python,tcl : Johannes Zellner |
| 951 | " mzscheme, lua : Charles Campbell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 952 | |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 953 | " Allows users to specify the type of embedded script highlighting |
| 954 | " they want: (perl/python/ruby/tcl support) |
| 955 | " g:vimsyn_embed == 0 : don't embed any scripts |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 956 | " g:vimsyn_embed =~# 'l' : embed Lua (but only if vim supports it) |
| 957 | " g:vimsyn_embed =~# 'm' : embed MzScheme (but only if vim supports it) |
| 958 | " g:vimsyn_embed =~# 'p' : embed Perl (but only if vim supports it) |
| 959 | " g:vimsyn_embed =~# 'P' : embed Python (but only if vim supports it) |
| 960 | " g:vimsyn_embed =~# 'r' : embed Ruby (but only if vim supports it) |
| 961 | " g:vimsyn_embed =~# 't' : embed Tcl (but only if vim supports it) |
Bram Moolenaar | 7cba6c0 | 2013-09-05 22:13:31 +0200 | [diff] [blame] | 962 | if !exists("g:vimsyn_embed") |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 963 | let g:vimsyn_embed= "lmpPr" |
Bram Moolenaar | 7cba6c0 | 2013-09-05 22:13:31 +0200 | [diff] [blame] | 964 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 965 | |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 966 | " [-- lua --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 967 | let s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim") |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 968 | if !filereadable(s:luapath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 969 | for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n") |
| 970 | if filereadable(fnameescape(s:luapath)) |
| 971 | let s:luapath= fnameescape(s:luapath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 972 | break |
| 973 | endif |
| 974 | endfor |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 975 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 976 | if (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath) |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 977 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 978 | syn cluster vimFuncBodyList add=vimLuaRegion |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 979 | exe "syn include @vimLuaScript ".s:luapath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 980 | VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+^\z(\s*\)lua\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimLuaScript |
| 981 | VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimLuaScript |
| 982 | VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+^\z(\s*\)lua\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimLuaScript |
| 983 | 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] | 984 | syn cluster vimFuncBodyList add=vimLuaRegion |
| 985 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 986 | syn region vimEmbedError start=+^\z(\s*\)lua\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 987 | syn region vimEmbedError start=+lua\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 988 | syn region vimEmbedError start=+^\z(\s*\)lua\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 989 | syn region vimEmbedError start=+lua\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 4b22cdb | 2010-08-02 22:12:46 +0200 | [diff] [blame] | 990 | endif |
| 991 | unlet s:luapath |
| 992 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 993 | " [-- perl --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 994 | let s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 995 | if !filereadable(s:perlpath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 996 | for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n") |
| 997 | if filereadable(fnameescape(s:perlpath)) |
| 998 | let s:perlpath= fnameescape(s:perlpath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 999 | break |
| 1000 | endif |
| 1001 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1002 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1003 | if (g:vimsyn_embed =~# 'p' && has("perl")) && filereadable(s:perlpath) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1004 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1005 | syn cluster vimFuncBodyList add=vimPerlRegion |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1006 | exe "syn include @vimPerlScript ".s:perlpath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1007 | VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimPerlScript |
| 1008 | VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimPerlScript |
| 1009 | VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimPerlScript |
| 1010 | 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] | 1011 | syn cluster vimFuncBodyList add=vimPerlRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1012 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1013 | syn region vimEmbedError start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1014 | syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1015 | syn region vimEmbedError start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1016 | syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1017 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1018 | unlet s:perlpath |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1019 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1020 | " [-- ruby --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1021 | let s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1022 | if !filereadable(s:rubypath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1023 | for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n") |
| 1024 | if filereadable(fnameescape(s:rubypath)) |
| 1025 | let s:rubypath= fnameescape(s:rubypath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1026 | break |
| 1027 | endif |
| 1028 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1029 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1030 | if (g:vimsyn_embed =~# 'r' && has("ruby")) && filereadable(s:rubypath) |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1031 | syn cluster vimFuncBodyList add=vimRubyRegion |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1032 | unlet! b:current_syntax |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1033 | exe "syn include @vimRubyScript ".s:rubypath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1034 | VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimRubyScript |
| 1035 | VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub\%[y]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimRubyScript |
| 1036 | VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimRubyScript |
| 1037 | 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] | 1038 | syn cluster vimFuncBodyList add=vimRubyRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1039 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1040 | syn region vimEmbedError start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1041 | syn region vimEmbedError start=+rub\%[y]\s*<<\s*\z(\S.*\)+ end=+^\z1$+ |
| 1042 | syn region vimEmbedError start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1043 | syn region vimEmbedError start=+rub\%[y]\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1044 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1045 | unlet s:rubypath |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1046 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1047 | " [-- python --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1048 | let s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1049 | if !filereadable(s:pythonpath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1050 | for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n") |
| 1051 | if filereadable(fnameescape(s:pythonpath)) |
| 1052 | let s:pythonpath= fnameescape(s:pythonpath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1053 | break |
| 1054 | endif |
| 1055 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1056 | endif |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1057 | if g:vimsyn_embed =~# 'P' && has("pythonx") && filereadable(s:pythonpath) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1058 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1059 | syn cluster vimFuncBodyList add=vimPythonRegion |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1060 | exe "syn include @vimPythonScript ".s:pythonpath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1061 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimPythonScript |
| 1062 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\z(\S\+\)+ end=+^\z1$+ contains=@vimPythonScript |
| 1063 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimPythonScript |
| 1064 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*$+ end=+^\.$+ contains=@vimPythonScript |
| 1065 | VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=\z(\S\+\)+ end=+^\z1$+ contains=@vimPythonScript |
| 1066 | 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] | 1067 | syn cluster vimFuncBodyList add=vimPythonRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1068 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1069 | syn region vimEmbedError start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1070 | syn region vimEmbedError start=+py\%[thon][3x]\=\s*<<\s*\z(\S\+\)+ end=+^\z1$+ |
| 1071 | syn region vimEmbedError start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s*$+ end=+^\z1\.$+ |
| 1072 | syn region vimEmbedError start=+py\%[thon][3x]\=\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1073 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1074 | unlet s:pythonpath |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1075 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1076 | " [-- tcl --] {{{3 |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1077 | if has("win32") || has("win95") || has("win64") || has("win16") |
| 1078 | " apparently has("tcl") has been hanging vim on some windows systems with cygwin |
| 1079 | let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$') |
| 1080 | else |
| 1081 | let s:trytcl= 1 |
| 1082 | endif |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1083 | if s:trytcl |
| 1084 | let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim") |
| 1085 | if !filereadable(s:tclpath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1086 | for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n") |
| 1087 | if filereadable(fnameescape(s:tclpath)) |
| 1088 | let s:tclpath= fnameescape(s:tclpath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1089 | break |
| 1090 | endif |
| 1091 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1092 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1093 | if (g:vimsyn_embed =~# 't' && has("tcl")) && filereadable(s:tclpath) |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1094 | unlet! b:current_syntax |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1095 | syn cluster vimFuncBodyList add=vimTclRegion |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1096 | exe "syn include @vimTclScript ".s:tclpath |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1097 | VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimTclScript |
| 1098 | VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimTclScript |
| 1099 | VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimTclScript |
| 1100 | 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] | 1101 | syn cluster vimFuncBodyList add=vimTclScript |
| 1102 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1103 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1104 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1105 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1106 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1107 | endif |
| 1108 | unlet s:tclpath |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1109 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1110 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1111 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1112 | syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1113 | syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 9964e46 | 2007-05-05 17:54:07 +0000 | [diff] [blame] | 1114 | endif |
Bram Moolenaar | a687837 | 2014-03-22 21:02:50 +0100 | [diff] [blame] | 1115 | unlet s:trytcl |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1116 | |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1117 | " [-- mzscheme --] {{{3 |
Bram Moolenaar | adc2182 | 2011-04-01 18:03:16 +0200 | [diff] [blame] | 1118 | let s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim") |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1119 | if !filereadable(s:mzschemepath) |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1120 | for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n") |
| 1121 | if filereadable(fnameescape(s:mzschemepath)) |
| 1122 | let s:mzschemepath= fnameescape(s:mzschemepath) |
Bram Moolenaar | 9da7ff7 | 2015-01-14 12:52:36 +0100 | [diff] [blame] | 1123 | break |
| 1124 | endif |
| 1125 | endfor |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1126 | endif |
Bram Moolenaar | f391327 | 2016-02-25 00:00:01 +0100 | [diff] [blame] | 1127 | if (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath) |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1128 | unlet! b:current_syntax |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 1129 | let s:iskKeep= &isk |
Bram Moolenaar | 51ad4ea | 2018-04-06 11:14:11 +0200 | [diff] [blame] | 1130 | syn cluster vimFuncBodyList add=vimMzSchemeRegion |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1131 | exe "syn include @vimMzSchemeScript ".s:mzschemepath |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 1132 | let &isk= s:iskKeep |
| 1133 | unlet s:iskKeep |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1134 | VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimMzSchemeScript |
| 1135 | VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimMzSchemeScript |
| 1136 | VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimMzSchemeScript |
| 1137 | 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] | 1138 | syn cluster vimFuncBodyList add=vimMzSchemeRegion |
Bram Moolenaar | c236c16 | 2008-07-13 17:41:49 +0000 | [diff] [blame] | 1139 | else |
Ken Takata | 95e9078 | 2024-08-22 21:29:39 +0200 | [diff] [blame] | 1140 | syn region vimEmbedError start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ |
| 1141 | syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(\S*\)+ end=+^\z1$+ |
| 1142 | syn region vimEmbedError start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\*$+ end=+^\z1\.$+ |
| 1143 | syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+^\.$+ |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1144 | endif |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1145 | unlet s:mzschemepath |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1146 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1147 | " Synchronize (speed) {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1148 | "============ |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 1149 | if exists("g:vimsyn_minlines") |
| 1150 | exe "syn sync minlines=".g:vimsyn_minlines |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1151 | endif |
Bram Moolenaar | 03413f4 | 2016-04-12 21:07:15 +0200 | [diff] [blame] | 1152 | exe "syn sync maxlines=".s:vimsyn_maxlines |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1153 | syn sync linecont "^\s\+\\" |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1154 | syn sync linebreaks=1 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1155 | syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]" |
| 1156 | |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1157 | " ==================== |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1158 | " Highlighting Settings {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1159 | " ==================== |
| 1160 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1161 | if !exists("skip_vim_syntax_inits") |
| 1162 | if !exists("g:vimsyn_noerror") |
| 1163 | hi def link vimBehaveError vimError |
| 1164 | hi def link vimCollClassErr vimError |
| 1165 | hi def link vimErrSetting vimError |
| 1166 | hi def link vimEmbedError vimError |
| 1167 | hi def link vimFTError vimError |
| 1168 | hi def link vimFunctionError vimError |
| 1169 | hi def link vimFunc vimError |
| 1170 | hi def link vimHiAttribList vimError |
| 1171 | hi def link vimHiCtermError vimError |
| 1172 | hi def link vimHiKeyError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1173 | hi def link vimMapModErr vimError |
dkearns | ae321b5 | 2024-06-15 23:06:17 +1000 | [diff] [blame] | 1174 | hi def link vimShebangError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1175 | hi def link vimSubstFlagErr vimError |
| 1176 | hi def link vimSynCaseError vimError |
Brad King | d4634a2 | 2024-01-03 10:17:24 -0500 | [diff] [blame] | 1177 | hi def link vimSynFoldMethodError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1178 | hi def link vimBufnrWarn vimWarn |
| 1179 | endif |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1180 | |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1181 | hi def link vimAbb vimCommand |
| 1182 | hi def link vimAddress vimMark |
dkearns | c4aef9a | 2024-03-04 02:42:47 +1100 | [diff] [blame] | 1183 | hi def link vimAugroupBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1184 | hi def link vimAugroupError vimError |
| 1185 | hi def link vimAugroupKey vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1186 | hi def link vimAutoCmd vimCommand |
| 1187 | hi def link vimAutoEvent Type |
Bram Moolenaar | d58a3bf | 2020-09-28 21:48:16 +0200 | [diff] [blame] | 1188 | hi def link vimAutoCmdMod Special |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1189 | hi def link vimBang vimOper |
dkearns | 2c51e15 | 2024-02-27 07:10:18 +1100 | [diff] [blame] | 1190 | hi def link vimBehaveBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1191 | hi def link vimBehaveModel vimBehave |
| 1192 | hi def link vimBehave vimCommand |
| 1193 | hi def link vimBracket Delimiter |
Doug Kearns | 99984fc | 2024-07-18 20:45:19 +0200 | [diff] [blame] | 1194 | hi def link vimCall vimCommand |
dkearns | a3bddb7 | 2024-06-14 01:48:10 +1000 | [diff] [blame] | 1195 | hi def link vimCatch vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1196 | hi def link vimCmplxRepeat SpecialChar |
| 1197 | hi def link vimCommand Statement |
| 1198 | hi def link vimComment Comment |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 1199 | hi def link vimCommentError vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1200 | hi def link vimCommentString vimString |
| 1201 | hi def link vimCommentTitle PreProc |
| 1202 | hi def link vimCondHL vimCommand |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 1203 | hi def link vimConst vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1204 | hi def link vimContinue Special |
dkearns | 21ce159 | 2024-01-29 04:54:08 +1100 | [diff] [blame] | 1205 | hi def link vimContinueComment vimComment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1206 | hi def link vimCtrlChar SpecialChar |
Doug Kearns | fc64ac0 | 2024-06-22 11:20:36 +0200 | [diff] [blame] | 1207 | hi def link vimDefComment vim9Comment |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1208 | hi def link vimDefKey vimCommand |
| 1209 | hi def link vimDefParam vimVar |
dkearns | b1427b4 | 2024-02-28 05:59:30 +1100 | [diff] [blame] | 1210 | hi def link vimEcho vimCommand |
dkearns | 61887b3 | 2024-03-15 23:45:48 +1100 | [diff] [blame] | 1211 | hi def link vimEchohlNone vimGroup |
| 1212 | hi def link vimEchohl vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1213 | hi def link vimElseIfErr Error |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1214 | hi def link vimEndfunction vimCommand |
| 1215 | hi def link vimEnddef vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1216 | hi def link vimEnvvar PreProc |
| 1217 | hi def link vimError Error |
Bram Moolenaar | 6ba83ba | 2022-06-12 22:15:57 +0100 | [diff] [blame] | 1218 | hi def link vimEscape Special |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1219 | hi def link vimFBVar vimVar |
| 1220 | hi def link vimFgBgAttrib vimHiAttrib |
Bram Moolenaar | cbaff5e | 2022-04-08 17:45:08 +0100 | [diff] [blame] | 1221 | hi def link vimFuncEcho vimCommand |
dkearns | 1c97b5c | 2023-12-13 02:47:43 +1100 | [diff] [blame] | 1222 | hi def link vimFor vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1223 | hi def link vimFTCmd vimCommand |
| 1224 | hi def link vimFTOption vimSynType |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1225 | hi def link vimFuncBang vimBang |
| 1226 | hi def link vimFuncComment vimComment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1227 | hi def link vimFuncKey vimCommand |
| 1228 | hi def link vimFuncName Function |
dkearns | 35e6f4c | 2024-03-22 06:41:10 +1100 | [diff] [blame] | 1229 | hi def link vimFuncMod Special |
| 1230 | hi def link vimFuncParam vimVar |
| 1231 | hi def link vimFuncParamEquals vimOper |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1232 | hi def link vimFuncSID Special |
| 1233 | hi def link vimFuncVar Identifier |
| 1234 | hi def link vimGroupAdd vimSynOption |
| 1235 | hi def link vimGroupName vimGroup |
| 1236 | hi def link vimGroupRem vimSynOption |
| 1237 | hi def link vimGroupSpecial Special |
| 1238 | hi def link vimGroup Type |
| 1239 | hi def link vimHiAttrib PreProc |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1240 | hi def link vimHiBang vimBang |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1241 | hi def link vimHiClear Type |
| 1242 | hi def link vimHiCtermColor Constant |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1243 | hi def link vimHiCtermFgBg vimHiTerm |
dkearns | 9530fe4 | 2024-03-19 05:19:51 +1100 | [diff] [blame] | 1244 | hi def link vimHiCtermfont vimHiTerm |
| 1245 | hi def link vimHiCtermul vimHiTerm |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1246 | hi def link vimHiCTerm vimHiTerm |
| 1247 | hi def link vimHighlight vimCommand |
| 1248 | hi def link vimHiGroup vimGroupName |
| 1249 | hi def link vimHiGuiFgBg vimHiTerm |
| 1250 | hi def link vimHiGuiFont vimHiTerm |
| 1251 | hi def link vimHiGuiRgb vimNumber |
| 1252 | hi def link vimHiGui vimHiTerm |
| 1253 | hi def link vimHiNmbr Number |
| 1254 | hi def link vimHiStartStop vimHiTerm |
| 1255 | hi def link vimHiTerm Type |
| 1256 | hi def link vimHLGroup vimGroup |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1257 | hi def link vimInsert vimString |
| 1258 | hi def link vimIskSep Delimiter |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1259 | hi def link vim9KeymapLineComment vimKeymapLineComment |
dkearns | 6986644 | 2023-11-22 05:43:40 +1100 | [diff] [blame] | 1260 | hi def link vimKeymapLineComment vimComment |
| 1261 | hi def link vimKeymapTailComment vimComment |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1262 | hi def link vimLet vimCommand |
Bram Moolenaar | 1ff14ba | 2019-11-02 14:09:23 +0100 | [diff] [blame] | 1263 | hi def link vimLetHereDoc vimString |
| 1264 | hi def link vimLetHereDocStart Special |
| 1265 | hi def link vimLetHereDocStop Special |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 1266 | hi def link vimLetRegister Special |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1267 | hi def link vimLineComment vimComment |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1268 | hi def link vimMapBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1269 | hi def link vimMapModKey vimFuncSID |
| 1270 | hi def link vimMapMod vimBracket |
| 1271 | hi def link vimMap vimCommand |
| 1272 | hi def link vimMark Number |
| 1273 | hi def link vimMarkNumber vimNumber |
Doug Kearns | e85fdc7 | 2024-07-07 20:45:37 +0200 | [diff] [blame] | 1274 | hi def link vimMatch vimCommand |
| 1275 | hi def link vimMatchGroup vimGroup |
| 1276 | hi def link vimMatchNone vimGroup |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1277 | hi def link vimMenuBang vimBang |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1278 | hi def link vimMenuClear Special |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1279 | hi def link vimMenuMod vimMapMod |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1280 | hi def link vimMenuName PreProc |
dkearns | 62b2604 | 2024-03-10 03:43:28 +1100 | [diff] [blame] | 1281 | hi def link vimMenu vimCommand |
| 1282 | hi def link vimMenuNotation vimNotation |
| 1283 | hi def link vimMenuPriority Number |
| 1284 | hi def link vimMenuStatus Special |
| 1285 | hi def link vimMenutranslateComment vimComment |
Aliaksei Budavei | 80aabaa | 2024-03-31 19:26:32 +0300 | [diff] [blame] | 1286 | hi def link vimMethodName vimFuncName |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1287 | hi def link vimMtchComment vimComment |
| 1288 | hi def link vimNorm vimCommand |
| 1289 | hi def link vimNotation Special |
| 1290 | hi def link vimNotFunc vimCommand |
| 1291 | hi def link vimNotPatSep vimString |
| 1292 | hi def link vimNumber Number |
| 1293 | hi def link vimOperError Error |
| 1294 | hi def link vimOper Operator |
| 1295 | hi def link vimOption PreProc |
| 1296 | hi def link vimParenSep Delimiter |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 1297 | hi def link vimPatSepErr vimError |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1298 | hi def link vimPatSepR vimPatSep |
| 1299 | hi def link vimPatSep SpecialChar |
| 1300 | hi def link vimPatSepZone vimString |
| 1301 | hi def link vimPatSepZ vimPatSep |
| 1302 | hi def link vimPattern Type |
| 1303 | hi def link vimPlainMark vimMark |
| 1304 | hi def link vimPlainRegister vimRegister |
| 1305 | hi def link vimRegister SpecialChar |
| 1306 | hi def link vimScriptDelim Comment |
| 1307 | hi def link vimSearchDelim Statement |
| 1308 | hi def link vimSearch vimString |
| 1309 | hi def link vimSep Delimiter |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 1310 | hi def link vimSet vimCommand |
| 1311 | hi def link vimSetAll vimOption |
| 1312 | hi def link vimSetBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1313 | hi def link vimSetMod vimOption |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 1314 | hi def link vimSetSep vimSep |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1315 | hi def link vimSetString vimString |
Doug Kearns | ddbb6fe | 2024-07-24 20:21:22 +0200 | [diff] [blame] | 1316 | hi def link vimSetTermcap vimOption |
dkearns | ae321b5 | 2024-06-15 23:06:17 +1000 | [diff] [blame] | 1317 | hi def link vimShebang PreProc |
Doug Kearns | 262e25e | 2024-06-14 20:16:35 +0200 | [diff] [blame] | 1318 | hi def link vimSleep vimCommand |
| 1319 | hi def link vimSleepArg Constant |
| 1320 | hi def link vimSleepBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1321 | hi def link vimSpecFile Identifier |
| 1322 | hi def link vimSpecFileMod vimSpecFile |
| 1323 | hi def link vimSpecial Type |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1324 | hi def link vimStringCont vimString |
| 1325 | hi def link vimString String |
Bram Moolenaar | d2855f5 | 2018-07-31 22:23:58 +0200 | [diff] [blame] | 1326 | hi def link vimStringEnd vimString |
thinca | cf8695d | 2024-01-28 18:57:23 +0100 | [diff] [blame] | 1327 | hi def link vimStringInterpolationBrace vimEscape |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1328 | hi def link vimSubst1 vimSubst |
| 1329 | hi def link vimSubstDelim Delimiter |
| 1330 | hi def link vimSubstFlags Special |
| 1331 | hi def link vimSubstSubstr SpecialChar |
| 1332 | hi def link vimSubstTwoBS vimString |
| 1333 | hi def link vimSubst vimCommand |
| 1334 | hi def link vimSynCaseError Error |
| 1335 | hi def link vimSynCase Type |
| 1336 | hi def link vimSyncC Type |
| 1337 | hi def link vimSyncError Error |
| 1338 | hi def link vimSyncGroupName vimGroupName |
| 1339 | hi def link vimSyncGroup vimGroupName |
| 1340 | hi def link vimSyncKey Type |
| 1341 | hi def link vimSyncNone Type |
| 1342 | hi def link vimSynContains vimSynOption |
| 1343 | hi def link vimSynError Error |
Brad King | d4634a2 | 2024-01-03 10:17:24 -0500 | [diff] [blame] | 1344 | hi def link vimSynFoldMethodError Error |
| 1345 | hi def link vimSynFoldMethod Type |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1346 | hi def link vimSynKeyContainedin vimSynContains |
| 1347 | hi def link vimSynKeyOpt vimSynOption |
dkearns | c79646d | 2024-01-05 08:58:48 +1100 | [diff] [blame] | 1348 | hi def link vimSynCchar vimSynOption |
| 1349 | hi def link vimSynCcharValue Character |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1350 | hi def link vimSynMtchGrp vimSynOption |
| 1351 | hi def link vimSynMtchOpt vimSynOption |
| 1352 | hi def link vimSynNextgroup vimSynOption |
| 1353 | hi def link vimSynNotPatRange vimSynRegPat |
| 1354 | hi def link vimSynOption Special |
| 1355 | hi def link vimSynPatRange vimString |
| 1356 | hi def link vimSynRegOpt vimSynOption |
| 1357 | hi def link vimSynRegPat vimString |
| 1358 | hi def link vimSynReg Type |
| 1359 | hi def link vimSyntax vimCommand |
| 1360 | hi def link vimSynType vimSpecial |
dkearns | a3bddb7 | 2024-06-14 01:48:10 +1000 | [diff] [blame] | 1361 | hi def link vimThrow vimCommand |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1362 | hi def link vimTodo Todo |
Bram Moolenaar | 4d8f476 | 2021-06-27 15:18:56 +0200 | [diff] [blame] | 1363 | hi def link vimType Type |
dkearns | f686921 | 2023-12-11 01:53:24 +1100 | [diff] [blame] | 1364 | hi def link vimUnlet vimCommand |
dkearns | b614b28 | 2024-02-12 03:13:34 +1100 | [diff] [blame] | 1365 | hi def link vimUnletBang vimBang |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1366 | hi def link vimUnmap vimMap |
| 1367 | hi def link vimUserAttrbCmpltFunc Special |
| 1368 | hi def link vimUserAttrbCmplt vimSpecial |
| 1369 | hi def link vimUserAttrbKey vimOption |
| 1370 | hi def link vimUserAttrb vimSpecial |
| 1371 | hi def link vimUserAttrbError Error |
| 1372 | hi def link vimUserCmdError Error |
| 1373 | hi def link vimUserCommand vimCommand |
| 1374 | hi def link vimUserFunc Normal |
| 1375 | hi def link vimVar Identifier |
| 1376 | hi def link vimWarn WarningMsg |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 1377 | |
| 1378 | hi def link vim9Boolean Boolean |
| 1379 | hi def link vim9Comment Comment |
| 1380 | hi def link vim9CommentError vimError |
| 1381 | hi def link vim9CommentTitle PreProc |
| 1382 | hi def link vim9Const vimCommand |
| 1383 | hi def link vim9Final vimCommand |
| 1384 | hi def link vim9For vimCommand |
| 1385 | hi def link vim9LineComment vimComment |
| 1386 | hi def link vim9Null Constant |
| 1387 | hi def link vim9Var vimCommand |
| 1388 | hi def link vim9Variable vimVar |
| 1389 | hi def link vim9Vim9Script vimCommand |
| 1390 | hi def link vim9Vim9ScriptArg Special |
Bram Moolenaar | f37506f | 2016-08-31 22:22:10 +0200 | [diff] [blame] | 1391 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1392 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1393 | " Current Syntax Variable: {{{2 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1394 | let b:current_syntax = "vim" |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1395 | |
| 1396 | " --------------------------------------------------------------------- |
| 1397 | " Cleanup: {{{1 |
Doug Kearns | d65e58f | 2024-07-17 19:34:14 +0200 | [diff] [blame] | 1398 | delc Vim9 |
| 1399 | delc VimL |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1400 | delc VimFolda |
| 1401 | delc VimFoldf |
Doug Kearns | ce06493 | 2024-04-13 18:24:01 +0200 | [diff] [blame] | 1402 | delc VimFoldh |
| 1403 | delc VimFoldH |
Bram Moolenaar | a0f849e | 2015-10-30 14:37:44 +0100 | [diff] [blame] | 1404 | delc VimFoldl |
| 1405 | delc VimFoldm |
| 1406 | delc VimFoldp |
| 1407 | delc VimFoldP |
| 1408 | delc VimFoldr |
| 1409 | delc VimFoldt |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 1410 | let &cpo = s:keepcpo |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1411 | unlet s:keepcpo s:vim9script |
dkearns | 5d67aef | 2024-03-10 04:01:22 +1100 | [diff] [blame] | 1412 | " vim:ts=18 fdm=marker ft=vim |