1071d4279SBram Moolenaar" Vim syntax file 27cba6c06SBram Moolenaar" Language: Vim 7.4 script 37cba6c06SBram Moolenaar" Maintainer: Charles E. Campbell <[email protected]> 4*939a1abeSBram Moolenaar" Last Change: March 29, 2016 5*939a1abeSBram Moolenaar" Version: 7.4-45 6071d4279SBram Moolenaar" Automatically generated keyword lists: {{{1 7071d4279SBram Moolenaar 8071d4279SBram Moolenaar" Quit when a syntax file was already loaded {{{2 9071d4279SBram Moolenaarif exists("b:current_syntax") 10071d4279SBram Moolenaar finish 11071d4279SBram Moolenaarendif 126be7f873SBram Moolenaarlet s:keepcpo= &cpo 136be7f873SBram Moolenaarset cpo&vim 14071d4279SBram Moolenaar 15071d4279SBram Moolenaar" vimTodo: contains common special-notices for comments {{{2 16071d4279SBram Moolenaar" Use the vimCommentGroup cluster to add your own. 17e2719096SBram Moolenaarsyn keyword vimTodo contained COMBAK FIXME TODO XXX 18217ad920SBram Moolenaarsyn cluster vimCommentGroup contains=vimTodo,@Spell 19071d4279SBram Moolenaar 20071d4279SBram Moolenaar" regular vim commands {{{2 21*939a1abeSBram Moolenaarsyn keyword vimCommand contained a argd argu[ment] bf[irst] brea[k] buf cabc[lear] cc cfdo changes clo[se] cnf comc[lear] cpf[ile] cstag debugg[reedy] deletel dell diffg[et] dif[fupdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nore on[ly] packl perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] ru[ntime] sba[ll] sbp[revious] sci scr[iptnames] setl[ocal] sgi sh[ell] sIe sil[ent] sir sm[ap] sno[magic] sp spellu[ndo] sre[wind] srp star[tinsert] sun[hide] sy ta tabfir[st] tabN[ext] tags th[row] tN tr[ewind] un unl verb[ose] vimgrepa[dd] w winp[os] wqa[ll] xa[ll] xnoremenu 22*939a1abeSBram Moolenaarsyn keyword vimCommand contained ab argd[elete] as[cii] bl[ast] breaka[dd] bufdo cad[dbuffer] ccl[ose] cf[ile] chd[ir] cmapc[lear] cNf comp[iler] cp[revious] cuna[bbrev] del deletep delm[arks] diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] nos[wapfile] o[pen] packloadall po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru rv[iminfo] sbf[irst] sbr[ewind] scI scs sf[ind] sgI si sig sim[alt] sIr sme snoreme spe spellw[rong] srg st startr[eplace] sunme syn tab tabl[ast] tabo[nly] tc[l] tj[ump] tn[ext] try una[bbreviate] unlo[ckvar] ve[rsion] vi[sual] wa[ll] win[size] w[rite] x[it] xprop 23*939a1abeSBram Moolenaarsyn keyword vimCommand contained abc[lear] argdo au bm[odified] breakd[el] b[uffer] cadde[xpr] cd cfir[st] che[ckpath] cn cnf[ile] con cq[uit] cw[indow] delc[ommand] deletl delp diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa nu[mber] opt[ions] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab] rub[y] sal[l] sbl[ast] sb[uffer] scl scscope sfir[st] sgl sI sIg sin sl smenu snoremenu spelld[ump] sp[lit] sri sta[g] stj[ump] sunmenu sync tabc[lose] tabm[ove] tabp[revious] tcld[o] tl[ast] tN[ext] ts[elect] u[ndo] uns[ilent] vert[ical] viu[sage] wh[ile] wn[ext] ws[verb] xmapc[lear] xunme 24*939a1abeSBram Moolenaarsyn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bn[ext] breakl[ist] buffers caddf[ile] cdo cgetb[uffer] checkt[ime] cN cNf[ile] conf[irm] cr[ewind] d delel deletp dep diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd o ownsyntax pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rubyd[o] san[dbox] sbm[odified] sc scp se[t] sg sgn sic sign sIn sla[st] smile so spe[llgood] spr[evious] srI star st[op] sus[pend] syncbind tabd[o] tabN tabr[ewind] tclf[ile] tm to[pleft] tu undoj[oin] up[date] vi vmapc[lear] win wN[ext] wundo xme xunmenu 25*939a1abeSBram Moolenaarsyn keyword vimCommand contained al[l] argg[lobal] ba[ll] bN[ext] br[ewind] bun[load] cal[l] ce[nter] cgete[xpr] cl cnew[er] col[der] con[tinue] cs de delep delf di diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] ol[dfiles] p ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyf[ile] sa[rgument] sbn[ext] sce scr setf[iletype] sgc sgp sIc sil sip sl[eep] sn[ext] sor[t] spelli[nfo] sr srl start stopi[nsert] sv[iew] syntime tabe[dit] tabnew tabs te[aroff] tm[enu] tp[revious] tu[nmenu] undol[ist] v vie[w] vne[w] winc[md] wp[revious] wv[iminfo] xmenu xwininfo 26*939a1abeSBram Moolenaarsyn keyword vimCommand contained ar argl[ocal] bd[elete] bo[tright] bro[wse] bw[ipeout] cat[ch] cex[pr] cg[etfile] cla[st] cn[ext] colo[rscheme] cope[n] cscope debug d[elete] delf[unction] dif difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nor omapc[lear] pa[ckadd] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rundo sav[eas] sbN[ext] scg scripte[ncoding] setg[lobal] sge sgr sie sIl sIp sm[agic] sN[ext] so[urce] spellr[epall] src srn startg[replace] sts[elect] sw[apname] t tabf[ind] tabn[ext] ta[g] tf[irst] tn tr u unh[ide] ve vim[grep] vs[plit] windo wq x xnoreme y[ank] 27*939a1abeSBram Moolenaarsyn keyword vimCommand contained arga[dd] ar[gs] bel[owright] bp[revious] bu c cb[uffer] cf c[hange] cl[ist] cN[ext] com co[py] 28e2719096SBram Moolenaarsyn match vimCommand contained "\<z[-+^.=]\=\>" 29a6878375SBram Moolenaarsyn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns 30071d4279SBram Moolenaar 31071d4279SBram Moolenaar" vimOptions are caught only when contained in a vimSet {{{2 32*939a1abeSBram Moolenaarsyn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmdwinheight com conceallevel cpoptions cscopetag csto debug dict dir eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime revins ro ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan 33*939a1abeSBram Moolenaarsyn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cmp comments confirm cpt cscopetagorder csverb deco dictionary directory ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write 34*939a1abeSBram Moolenaarsyn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions cms commentstring consk crb cscopeverbose cuc def diff display edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relativenumber rightleft rs runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany 35*939a1abeSBram Moolenaarsyn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw co compatible conskey cryptmethod cspc cul define diffexpr dy ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescape remap rightleftcmd rtp sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup 36*939a1abeSBram Moolenaarsyn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cocu complete copyindent cscopepathcomp csprg cursorbind delcombine diffopt ea efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph pp printfont pumheight rdt renderoptions rl ru sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tal tcldll textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay 37*939a1abeSBram Moolenaarsyn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard cole completefunc cot cscopeprg csqf cursorcolumn dex digraph ead ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh re report rlc rubydll sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws 38*939a1abeSBram Moolenaarsyn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cm colorcolumn completeopt cp cscopequickfix csre cursorline dg dip eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww 39*939a1abeSBram Moolenaarsyn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdheight columns concealcursor cpo cscoperelative cst cwh 40071d4279SBram Moolenaar 41071d4279SBram Moolenaar" vimOptions: These are the turn-off setting variants {{{2 42*939a1abeSBram Moolenaarsyn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobreakindent nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangnoremap nolbr nolisp nolnr nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup 43*939a1abeSBram Moolenaarsyn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nobri noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolinebreak nolist noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows 44*939a1abeSBram Moolenaarsyn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois 45071d4279SBram Moolenaar 46071d4279SBram Moolenaar" vimOptions: These are the invertible variants {{{2 47*939a1abeSBram Moolenaarsyn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbreakindent invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangnoremap invlbr invlisp invlnr invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup 48*939a1abeSBram Moolenaarsyn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invbri invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlinebreak invlist invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws 49*939a1abeSBram Moolenaarsyn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis 50071d4279SBram Moolenaar 51071d4279SBram Moolenaar" termcap codes (which can also be set) {{{2 52*939a1abeSBram Moolenaarsyn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR 53*939a1abeSBram Moolenaarsyn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl 54071d4279SBram Moolenaarsyn match vimOption contained "t_%1" 55071d4279SBram Moolenaarsyn match vimOption contained "t_#2" 56071d4279SBram Moolenaarsyn match vimOption contained "t_#4" 57071d4279SBram Moolenaarsyn match vimOption contained "t_@7" 58071d4279SBram Moolenaarsyn match vimOption contained "t_*7" 59071d4279SBram Moolenaarsyn match vimOption contained "t_&8" 60071d4279SBram Moolenaarsyn match vimOption contained "t_%i" 61071d4279SBram Moolenaarsyn match vimOption contained "t_k;" 62071d4279SBram Moolenaar 63071d4279SBram Moolenaar" unsupported settings: these are supported by vi but don't do anything in vim {{{2 64cd71fa3cSBram Moolenaarsyn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600 65071d4279SBram Moolenaar 6680a94a58SBram Moolenaar" AutoCmd Events {{{2 67071d4279SBram Moolenaarsyn case ignore 68a0f849eeSBram Moolenaarsyn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave 69071d4279SBram Moolenaar 70071d4279SBram Moolenaar" Highlight commonly used Groupnames {{{2 71b2c0350cSBram Moolenaarsyn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo 72071d4279SBram Moolenaar 73071d4279SBram Moolenaar" Default highlighting groups {{{2 74a6878375SBram Moolenaarsyn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu 75293ee4d4SBram Moolenaarsyn match vimHLGroup contained "Conceal" 76071d4279SBram Moolenaarsyn case match 77071d4279SBram Moolenaar 78071d4279SBram Moolenaar" Function Names {{{2 79*939a1abeSBram Moolenaarsyn keyword vimFuncName contained abs and arglistid assert_exception assert_true browsedir bufname byteidx changenr ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype empty executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory items job_setoptions job_stop js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strdisplaywidth string strridx submatch synID synstack tabpagebuflist tagfiles tanh timer_stop tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount 80*939a1abeSBram Moolenaarsyn keyword vimFuncName contained acos append argv assert_fails atan bufexists bufnr byteidxcomp char2nr ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler escape exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked job_getchannel job_start join json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strftime strlen strtrans substitute synIDattr system tabpagenr taglist tempname tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile 81*939a1abeSBram Moolenaarsyn keyword vimFuncName contained add argc asin assert_false atan2 buflisted bufwinnr call ch_close ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert isnan job_info job_status js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strchars stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan timer_start toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor 82*939a1abeSBram Moolenaarsyn keyword vimFuncName contained alloc_fail argidx assert_equal assert_match browse bufloaded byte2line ceil ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete disable_char_avail_for_testing eventhandler 83071d4279SBram Moolenaar 84ac7bd638SBram Moolenaar"--- syntax here and above generated by mkvimvim --- 85cfbc5ee4SBram Moolenaar" Special Vim Highlighting (not automatic) {{{1 86071d4279SBram Moolenaar 87a0f849eeSBram Moolenaar" Set up folding commands 88f391327aSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[aflmpPrt]' 89f391327aSBram Moolenaar if g:vimsyn_folding =~# 'a' 90a0f849eeSBram Moolenaar com! -nargs=* VimFolda <args> fold 91a0f849eeSBram Moolenaar else 92a0f849eeSBram Moolenaar com! -nargs=* VimFolda <args> 93a0f849eeSBram Moolenaar endif 94f391327aSBram Moolenaar if g:vimsyn_folding =~# 'f' 95a0f849eeSBram Moolenaar com! -nargs=* VimFoldf <args> fold 96a0f849eeSBram Moolenaar else 97a0f849eeSBram Moolenaar com! -nargs=* VimFoldf <args> 98a0f849eeSBram Moolenaar endif 99f391327aSBram Moolenaar if g:vimsyn_folding =~# 'l' 100a0f849eeSBram Moolenaar com! -nargs=* VimFoldl <args> fold 101a0f849eeSBram Moolenaar else 102a0f849eeSBram Moolenaar com! -nargs=* VimFoldl <args> 103a0f849eeSBram Moolenaar endif 104f391327aSBram Moolenaar if g:vimsyn_folding =~# 'm' 105a0f849eeSBram Moolenaar com! -nargs=* VimFoldm <args> fold 106a0f849eeSBram Moolenaar else 107a0f849eeSBram Moolenaar com! -nargs=* VimFoldm <args> 108a0f849eeSBram Moolenaar endif 109f391327aSBram Moolenaar if g:vimsyn_folding =~# 'p' 110a0f849eeSBram Moolenaar com! -nargs=* VimFoldp <args> fold 111a0f849eeSBram Moolenaar else 112a0f849eeSBram Moolenaar com! -nargs=* VimFoldp <args> 113a0f849eeSBram Moolenaar endif 114f391327aSBram Moolenaar if g:vimsyn_folding =~# 'P' 115a0f849eeSBram Moolenaar com! -nargs=* VimFoldP <args> fold 116a0f849eeSBram Moolenaar else 117a0f849eeSBram Moolenaar com! -nargs=* VimFoldP <args> 118a0f849eeSBram Moolenaar endif 119f391327aSBram Moolenaar if g:vimsyn_folding =~# 'r' 120a0f849eeSBram Moolenaar com! -nargs=* VimFoldr <args> fold 121a0f849eeSBram Moolenaar else 122a0f849eeSBram Moolenaar com! -nargs=* VimFoldr <args> 123a0f849eeSBram Moolenaar endif 124f391327aSBram Moolenaar if g:vimsyn_folding =~# 't' 125a0f849eeSBram Moolenaar com! -nargs=* VimFoldt <args> fold 126a0f849eeSBram Moolenaar else 127a0f849eeSBram Moolenaar com! -nargs=* VimFoldt <args> 128a0f849eeSBram Moolenaar endif 129a0f849eeSBram Moolenaarelse 130a0f849eeSBram Moolenaar com! -nargs=* VimFolda <args> 131a0f849eeSBram Moolenaar com! -nargs=* VimFoldf <args> 132a0f849eeSBram Moolenaar com! -nargs=* VimFoldl <args> 133a0f849eeSBram Moolenaar com! -nargs=* VimFoldm <args> 134a0f849eeSBram Moolenaar com! -nargs=* VimFoldp <args> 135a0f849eeSBram Moolenaar com! -nargs=* VimFoldP <args> 136a0f849eeSBram Moolenaar com! -nargs=* VimFoldr <args> 137a0f849eeSBram Moolenaar com! -nargs=* VimFoldt <args> 138a0f849eeSBram Moolenaarendif 139a0f849eeSBram Moolenaar 140fa01c39dSBram Moolenaar" commands not picked up by the generator (due to non-standard format) 141fa01c39dSBram Moolenaarsyn keyword vimCommand contained py3 142fa01c39dSBram Moolenaar 1433577c6faSBram Moolenaar" Deprecated variable options {{{2 1443577c6faSBram Moolenaarif exists("g:vim_minlines") 1453577c6faSBram Moolenaar let g:vimsyn_minlines= g:vim_minlines 1463577c6faSBram Moolenaarendif 1473577c6faSBram Moolenaarif exists("g:vim_maxlines") 1483577c6faSBram Moolenaar let g:vimsyn_maxlines= g:vim_maxlines 1493577c6faSBram Moolenaarendif 1503577c6faSBram Moolenaarif exists("g:vimsyntax_noerror") 1513577c6faSBram Moolenaar let g:vimsyn_noerror= g:vimsyntax_noerror 1523577c6faSBram Moolenaarendif 1533577c6faSBram Moolenaar 154cfbc5ee4SBram Moolenaar" Numbers {{{2 155071d4279SBram Moolenaar" ======= 1569da7ff70SBram Moolenaarsyn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand 1579da7ff70SBram Moolenaarsyn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand 158071d4279SBram Moolenaarsyn match vimNumber "\<0[xX]\x\+" 159e2719096SBram Moolenaarsyn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}" 160071d4279SBram Moolenaar 161cfbc5ee4SBram Moolenaar" All vimCommands are contained by vimIsCommands. {{{2 162b4ff518dSBram Moolenaarsyn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd 163293ee4d4SBram Moolenaarsyn match vimIsCommand "\<\h\w*\>" contains=vimCommand 16483d1b190SBram Moolenaarsyn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" 16583d1b190SBram Moolenaarsyn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>" 16683d1b190SBram Moolenaarsyn match vimFBVar contained "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>" 1673b1ddfedSBram Moolenaarsyn keyword vimCommand contained in 168071d4279SBram Moolenaar 169cfbc5ee4SBram Moolenaar" Insertions And Appends: insert append {{{2 170071d4279SBram Moolenaar" ======================= 171071d4279SBram Moolenaarsyn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" 172071d4279SBram Moolenaarsyn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" 173071d4279SBram Moolenaarsyn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" 174071d4279SBram Moolenaar 175cfbc5ee4SBram Moolenaar" Behave! {{{2 176071d4279SBram Moolenaar" ======= 177071d4279SBram Moolenaarsyn match vimBehave "\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError 178071d4279SBram Moolenaarsyn keyword vimBehaveModel contained mswin xterm 1796be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror") 180071d4279SBram Moolenaar syn match vimBehaveError contained "[^ ]\+" 181cfbc5ee4SBram Moolenaarendif 182071d4279SBram Moolenaar 183cfbc5ee4SBram Moolenaar" Filetypes {{{2 184071d4279SBram Moolenaar" ========= 185293ee4d4SBram Moolenaarsyn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError 1866be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError") 187071d4279SBram Moolenaar syn match vimFTError contained "\I\i*" 188cfbc5ee4SBram Moolenaarendif 189071d4279SBram Moolenaarsyn keyword vimFTCmd contained filet[ype] 190071d4279SBram Moolenaarsyn keyword vimFTOption contained detect indent off on plugin 191071d4279SBram Moolenaar 192cfbc5ee4SBram Moolenaar" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 193071d4279SBram Moolenaar" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. 194e2719096SBram Moolenaarsyn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue 195f391327aSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' 196b4ff518dSBram Moolenaar syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList 197b4ff518dSBram Moolenaarelse 198b4ff518dSBram Moolenaar syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList 199b4ff518dSBram Moolenaarendif 2003b1ddfedSBram Moolenaarsyn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey 2016be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror") 202071d4279SBram Moolenaar syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" 203cfbc5ee4SBram Moolenaarendif 20483d1b190SBram Moolenaarsyn keyword vimAugroupKey contained aug[roup] 205071d4279SBram Moolenaar 206cfbc5ee4SBram Moolenaar" Operators: {{{2 207071d4279SBram Moolenaar" ========= 2089da7ff70SBram Moolenaarsyn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue 209071d4279SBram Moolenaarsyn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile 210071d4279SBram Moolenaarsyn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile 21183d1b190SBram Moolenaarsyn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup 21283d1b190SBram Moolenaarsyn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar 2136be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") 214071d4279SBram Moolenaar syn match vimOperError ")" 215cfbc5ee4SBram Moolenaarendif 216071d4279SBram Moolenaar 2173577c6faSBram Moolenaar" Functions : Tag is provided for those who wish to highlight tagged functions {{{2 2183577c6faSBram Moolenaar" ========= 2195c73622aSBram Moolenaarsyn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID 220b4ff518dSBram Moolenaarsyn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand 2215c73622aSBram Moolenaarsyn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody 2225c73622aSBram Moolenaar 223f391327aSBram Moolenaarif exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' 224b4ff518dSBram Moolenaar syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList 225b4ff518dSBram Moolenaarelse 226b4ff518dSBram Moolenaar syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList 227b4ff518dSBram Moolenaarendif 228b4ff518dSBram Moolenaarsyn match vimFuncVar contained "a:\(\K\k*\|\d\+\)" 2293577c6faSBram Moolenaarsyn match vimFuncSID contained "\c<sid>\|\<s:" 2303577c6faSBram Moolenaarsyn keyword vimFuncKey contained fu[nction] 2313577c6faSBram Moolenaarsyn match vimFuncBlank contained "\s\+" 2323577c6faSBram Moolenaar 2333577c6faSBram Moolenaarsyn keyword vimPattern contained start skip end 2343577c6faSBram Moolenaar 235cfbc5ee4SBram Moolenaar" Special Filenames, Modifiers, Extension Removal: {{{2 236071d4279SBram Moolenaar" =============================================== 237071d4279SBram Moolenaarsyn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst 238071d4279SBram Moolenaarsyn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst 239071d4279SBram Moolenaarsyn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst 240071d4279SBram Moolenaarsyn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst 241071d4279SBram Moolenaarsyn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst 242071d4279SBram Moolenaarsyn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst 243071d4279SBram Moolenaarsyn match vimSpecFileMod "\(:[phtre]\)\+" contained 244071d4279SBram Moolenaar 245cfbc5ee4SBram Moolenaar" User-Specified Commands: {{{2 246071d4279SBram Moolenaar" ======================= 2475c73622aSBram Moolenaarsyn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine 248071d4279SBram Moolenaarsyn keyword vimUserCommand contained com[mand] 249b4ff518dSBram Moolenaarsyn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList 250b4ff518dSBram Moolenaarsyn match vimUserAttrbError contained "-\a\+\ze\s" 251b4ff518dSBram Moolenaarsyn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper 252b4ff518dSBram Moolenaarsyn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError 253b4ff518dSBram Moolenaarsyn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey 254b4ff518dSBram Moolenaarsyn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey 255b4ff518dSBram Moolenaarsyn match vimUserAttrb contained "-bang\>" contains=vimOper,vimUserAttrbKey 256071d4279SBram Moolenaarsyn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey 257b4ff518dSBram Moolenaarsyn match vimUserAttrb contained "-buffer\>" contains=vimOper,vimUserAttrbKey 258b4ff518dSBram Moolenaarsyn match vimUserAttrb contained "-register\>" contains=vimOper,vimUserAttrbKey 2596be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror") 260071d4279SBram Moolenaar syn match vimUserCmdError contained "\S\+\>" 261cfbc5ee4SBram Moolenaarendif 262071d4279SBram Moolenaarsyn case ignore 263071d4279SBram Moolenaarsyn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister] 2649da7ff70SBram Moolenaarsyn keyword vimUserAttrbCmplt contained augroup buffer color command compiler cscope dir environment event expression file file_in_path filetype function help highlight locale mapping menu option shellcmd sign syntax tag tag_listfiles var 265a93fa7eeSBram Moolenaarsyn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError 2669da7ff70SBram Moolenaarsyn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError 267a93fa7eeSBram Moolenaar 268071d4279SBram Moolenaarsyn case match 269071d4279SBram Moolenaarsyn match vimUserAttrbCmplt contained "custom,\u\w*" 270071d4279SBram Moolenaar 271cfbc5ee4SBram Moolenaar" Lower Priority Comments: after some vim commands... {{{2 272071d4279SBram Moolenaar" ======================= 273071d4279SBram Moolenaarsyn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString 274071d4279SBram Moolenaarsyn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString 275071d4279SBram Moolenaarsyn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString 2764770d09aSBram Moolenaarsyn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' 277071d4279SBram Moolenaar 278cfbc5ee4SBram Moolenaar" Environment Variables: {{{2 279071d4279SBram Moolenaar" ===================== 280071d4279SBram Moolenaarsyn match vimEnvvar "\$\I\i*" 281071d4279SBram Moolenaarsyn match vimEnvvar "\${\I\i*}" 282071d4279SBram Moolenaar 283cfbc5ee4SBram Moolenaar" In-String Specials: {{{2 284071d4279SBram Moolenaar" Try to catch strings, if nothing else matches (therefore it must precede the others!) 285071d4279SBram Moolenaar" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside []) 286d68071d8SBram Moolenaarsyn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1 287071d4279SBram Moolenaarsyn match vimPatSepErr contained "\\)" 288071d4279SBram Moolenaarsyn match vimPatSep contained "\\|" 289383f9bc3SBram Moolenaarsyn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\]['"]" contains=@vimStringGroup 290383f9bc3SBram Moolenaarsyn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline 291071d4279SBram Moolenaarsyn match vimNotPatSep contained "\\\\" 2929964e468SBram Moolenaarsyn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell 2939da7ff70SBram Moolenaarsyn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup 2949da7ff70SBram Moolenaarsyn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+ 295071d4279SBram Moolenaarsyn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup 296071d4279SBram Moolenaarsyn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup 297071d4279SBram Moolenaarsyn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup 298071d4279SBram Moolenaarsyn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont 299071d4279SBram Moolenaarsyn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ 300071d4279SBram Moolenaar 301cfbc5ee4SBram Moolenaar" Substitutions: {{{2 302071d4279SBram Moolenaar" ============= 303071d4279SBram Moolenaarsyn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation 304071d4279SBram Moolenaarsyn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation 305071d4279SBram Moolenaarsyn cluster vimSubstList add=vimCollection 3069da7ff70SBram Moolenaarsyn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[:[:alpha:]]\@!" nextgroup=vimSubstPat 307e0fa3742SBram Moolenaarsyn match vimSubst "\%(^\|[^\\]\)s\%[ubstitute][:#[:alpha:]]\@!" nextgroup=vimSubstPat contained 308071d4279SBram Moolenaarsyn match vimSubst "/\zss\%[ubstitute]\ze/" nextgroup=vimSubstPat 309071d4279SBram Moolenaarsyn match vimSubst1 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat 310071d4279SBram Moolenaarsyn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline 311071d4279SBram Moolenaarsyn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline 312071d4279SBram Moolenaarsyn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass 313071d4279SBram Moolenaarsyn match vimCollClassErr contained "\[:.\{-\}:\]" 314071d4279SBram Moolenaarsyn match vimCollClass contained transparent "\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]" 315071d4279SBram Moolenaarsyn match vimSubstSubstr contained "\\z\=\d" 316071d4279SBram Moolenaarsyn match vimSubstTwoBS contained "\\\\" 317a5792f58SBram Moolenaarsyn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags 318071d4279SBram Moolenaarsyn match vimSubstFlags contained "[&cegiIpr]\+" 319071d4279SBram Moolenaar 320cfbc5ee4SBram Moolenaar" 'String': {{{2 3218b6144bdSBram Moolenaarsyn match vimString "[^(,]'[^']\{-}\zs'" 322071d4279SBram Moolenaar 323cfbc5ee4SBram Moolenaar" Marks, Registers, Addresses, Filters: {{{2 324071d4279SBram Moolenaarsyn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst 325071d4279SBram Moolenaarsyn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst 326071d4279SBram Moolenaarsyn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst 327071d4279SBram Moolenaarsyn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst 328071d4279SBram Moolenaarsyn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst 329071d4279SBram Moolenaarsyn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper 330071d4279SBram Moolenaarsyn match vimPlainMark contained "'[a-zA-Z0-9]" 331071d4279SBram Moolenaar 332b4ff518dSBram Moolenaarsyn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]' 3335b8d8fdbSBram Moolenaarsyn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]' 3345b8d8fdbSBram Moolenaarsyn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]' 335cfbc5ee4SBram Moolenaarsyn match vimRegister '@"' 336071d4279SBram Moolenaarsyn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]' 337071d4279SBram Moolenaar 3385b8d8fdbSBram Moolenaarsyn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1 3395b8d8fdbSBram Moolenaarsyn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1 340071d4279SBram Moolenaar 341071d4279SBram Moolenaarsyn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile 342d960d76dSBram Moolenaarsyn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile,vimFunction,vimFuncName,vimOperParen 343071d4279SBram Moolenaar 344cfbc5ee4SBram Moolenaar" Complex repeats (:h complex-repeat) {{{2 3456be7f873SBram Moolenaarsyn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 3466be7f873SBram Moolenaarsyn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' 347071d4279SBram Moolenaar 348cfbc5ee4SBram Moolenaar" Set command and associated set-options (vimOptions) with comment {{{2 34974cbdf03SBram Moolenaarsyn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod 3509da7ff70SBram Moolenaarsyn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline 351071d4279SBram Moolenaarsyn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar 352b4ff518dSBram Moolenaarsyn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand 3535c73622aSBram Moolenaarsyn match vimSetMod contained "&vim\=\|[!&?<]\|all&" 354071d4279SBram Moolenaar 355cfbc5ee4SBram Moolenaar" Let {{{2 356071d4279SBram Moolenaar" === 3575c73622aSBram Moolenaarsyn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar 358071d4279SBram Moolenaar 359e37d50a5SBram Moolenaar" Abbreviations {{{2 360e37d50a5SBram Moolenaar" ============= 361e37d50a5SBram Moolenaarsyn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs 362e37d50a5SBram Moolenaar 363cfbc5ee4SBram Moolenaar" Autocmd {{{2 364071d4279SBram Moolenaar" ======= 365071d4279SBram Moolenaarsyn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace 366071d4279SBram Moolenaarsyn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList 367071d4279SBram Moolenaarsyn match vimAutoCmdSfxList contained "\S*" 368071d4279SBram Moolenaarsyn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList 369071d4279SBram Moolenaar 370cfbc5ee4SBram Moolenaar" Echo and Execute -- prefer strings! {{{2 371071d4279SBram Moolenaar" ================ 3725c73622aSBram Moolenaarsyn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar 3735c73622aSBram Moolenaarsyn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar 374071d4279SBram Moolenaarsyn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone 375071d4279SBram Moolenaarsyn case ignore 376071d4279SBram Moolenaarsyn keyword vimEchoHLNone none 377071d4279SBram Moolenaarsyn case match 378071d4279SBram Moolenaar 379cfbc5ee4SBram Moolenaar" Maps {{{2 380071d4279SBram Moolenaar" ==== 3813577c6faSBram Moolenaarsyn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs 3825c73622aSBram Moolenaarsyn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs 38381af9250SBram Moolenaarsyn keyword vimMap mapc[lear] smapc[lear] 3845c73622aSBram Moolenaarsyn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs 385b8a7b560SBram Moolenaarsyn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs 386b8a7b560SBram Moolenaarsyn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs 387b4ff518dSBram Moolenaarsyn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs 388b8a7b560SBram Moolenaarsyn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend 389b4ff518dSBram Moolenaarsyn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue 390071d4279SBram Moolenaarsyn case ignore 391b4ff518dSBram Moolenaarsyn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique 392071d4279SBram Moolenaarsyn case match 393071d4279SBram Moolenaar 394cfbc5ee4SBram Moolenaar" Menus {{{2 395071d4279SBram Moolenaar" ===== 396071d4279SBram Moolenaarsyn cluster vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod 397071d4279SBram Moolenaarsyn keyword vimCommand am[enu] an[oremenu] aun[menu] cme[nu] cnoreme[nu] cunme[nu] ime[nu] inoreme[nu] iunme[nu] me[nu] nme[nu] nnoreme[nu] noreme[nu] nunme[nu] ome[nu] onoreme[nu] ounme[nu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] skipwhite nextgroup=@vimMenuList 398071d4279SBram Moolenaarsyn match vimMenuName "[^ \t\\<]\+" contained nextgroup=vimMenuNameMore,vimMenuMap 399071d4279SBram Moolenaarsyn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMenuName 400071d4279SBram Moolenaarsyn match vimMenuNameMore "\c\\\s\|<tab>\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation 401071d4279SBram Moolenaarsyn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList 402071d4279SBram Moolenaarsyn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs 403071d4279SBram Moolenaarsyn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vimIsCommand 404071d4279SBram Moolenaarsyn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList 405071d4279SBram Moolenaar 406cfbc5ee4SBram Moolenaar" Angle-Bracket Notation (tnx to Michael Geddes) {{{2 407071d4279SBram Moolenaar" ====================== 408071d4279SBram Moolenaarsyn case ignore 40983d1b190SBram Moolenaarsyn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket 410071d4279SBram Moolenaarsyn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket 411071d4279SBram Moolenaarsyn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket 412071d4279SBram Moolenaarsyn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket 413d68071d8SBram Moolenaarsyn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|f-args\|lt\)>' contains=vimBracket 414071d4279SBram Moolenaarsyn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket 415071d4279SBram Moolenaarsyn match vimBracket contained "[\\<>]" 416071d4279SBram Moolenaarsyn case match 417071d4279SBram Moolenaar 4183577c6faSBram Moolenaar" User Function Highlighting {{{2 4193577c6faSBram Moolenaar" (following Gautam Iyer's suggestion) 420071d4279SBram Moolenaar" ========================== 421a0f849eeSBram Moolenaarsyn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute 422a0f849eeSBram Moolenaarsyn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation 4235c73622aSBram Moolenaarsyn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" 424071d4279SBram Moolenaar 4253577c6faSBram Moolenaar" Errors And Warnings: {{{2 4263577c6faSBram Moolenaar" ==================== 4276be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") 4285c73622aSBram Moolenaar syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank 4295c73622aSBram Moolenaar" syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank 4303577c6faSBram Moolenaar syn match vimElseIfErr "\<else\s\+if\>" 4313577c6faSBram Moolenaar syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ 4323577c6faSBram Moolenaarendif 4333577c6faSBram Moolenaar 4343577c6faSBram Moolenaar" Norm {{{2 43505159a0cSBram Moolenaar" ==== 43605159a0cSBram Moolenaarsyn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds 43705159a0cSBram Moolenaarsyn match vimNormCmds contained ".*$" 43805159a0cSBram Moolenaar 439cfbc5ee4SBram Moolenaar" Syntax {{{2 440071d4279SBram Moolenaar"======= 441071d4279SBram Moolenaarsyn match vimGroupList contained "@\=[^ \t,]*" contains=vimGroupSpecial,vimPatSep 442071d4279SBram Moolenaarsyn match vimGroupList contained "@\=[^ \t,]*," nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep 4435c73622aSBram Moolenaarsyn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP 4446be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror") 445071d4279SBram Moolenaar syn match vimSynError contained "\i\+" 446071d4279SBram Moolenaar syn match vimSynError contained "\i\+=" nextgroup=vimGroupList 447cfbc5ee4SBram Moolenaarendif 448071d4279SBram Moolenaarsyn match vimSynContains contained "\<contain\(s\|edin\)=" nextgroup=vimGroupList 449071d4279SBram Moolenaarsyn match vimSynKeyContainedin contained "\<containedin=" nextgroup=vimGroupList 450071d4279SBram Moolenaarsyn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList 451071d4279SBram Moolenaar 452071d4279SBram Moolenaarsyn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment 453071d4279SBram Moolenaarsyn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment 454d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSyntax 455071d4279SBram Moolenaar 456cfbc5ee4SBram Moolenaar" Syntax: case {{{2 457071d4279SBram Moolenaarsyn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError 4586be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror") 459071d4279SBram Moolenaar syn match vimSynCaseError contained "\i\+" 460cfbc5ee4SBram Moolenaarendif 461071d4279SBram Moolenaarsyn keyword vimSynCase contained ignore match 462071d4279SBram Moolenaar 463cfbc5ee4SBram Moolenaar" Syntax: clear {{{2 464071d4279SBram Moolenaarsyn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList 465071d4279SBram Moolenaar 466cfbc5ee4SBram Moolenaar" Syntax: cluster {{{2 467071d4279SBram Moolenaarsyn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName 468a0f849eeSBram Moolenaarsyn region vimClusterName contained matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError 469071d4279SBram Moolenaarsyn match vimGroupAdd contained "add=" nextgroup=vimGroupList 470071d4279SBram Moolenaarsyn match vimGroupRem contained "remove=" nextgroup=vimGroupList 471d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem 472071d4279SBram Moolenaar 47313d5aeefSBram Moolenaar" Syntax: iskeyword {{{2 47413d5aeefSBram Moolenaarsyn keyword vimSynType contained iskeyword skipwhite nextgroup=vimIskList 47513d5aeefSBram Moolenaarsyn match vimIskList contained '\S\+' contains=vimIskSep 47613d5aeefSBram Moolenaarsyn match vimIskSep contained ',' 47713d5aeefSBram Moolenaar 478cfbc5ee4SBram Moolenaar" Syntax: include {{{2 479071d4279SBram Moolenaarsyn keyword vimSynType contained include skipwhite nextgroup=vimGroupList 480d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType 481071d4279SBram Moolenaar 482cfbc5ee4SBram Moolenaar" Syntax: keyword {{{2 483071d4279SBram Moolenaarsyn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin 484071d4279SBram Moolenaarsyn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion 485a0f849eeSBram Moolenaarsyn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup 486071d4279SBram Moolenaarsyn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" 487d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType 488071d4279SBram Moolenaar 489cfbc5ee4SBram Moolenaar" Syntax: match {{{2 490071d4279SBram Moolenaarsyn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation 491071d4279SBram Moolenaarsyn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion 492a0f849eeSBram Moolenaarsyn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup 493071d4279SBram Moolenaarsyn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" 494071d4279SBram Moolenaarif has("conceal") 49583d1b190SBram Moolenaar syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar 4965c73622aSBram Moolenaar syn match vimSynMtchCchar contained "\S" 497071d4279SBram Moolenaarendif 498d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynMtchGroup 499071d4279SBram Moolenaar 500cfbc5ee4SBram Moolenaar" Syntax: off and on {{{2 501071d4279SBram Moolenaarsyn keyword vimSynType contained enable list manual off on reset 502071d4279SBram Moolenaar 503cfbc5ee4SBram Moolenaar" Syntax: region {{{2 504071d4279SBram Moolenaarsyn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation 505071d4279SBram Moolenaarsyn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp 506071d4279SBram Moolenaarsyn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion 507a0f849eeSBram Moolenaarsyn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup 508071d4279SBram Moolenaarsyn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" 509071d4279SBram Moolenaarsyn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat 510071d4279SBram Moolenaarsyn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup 511071d4279SBram Moolenaarsyn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg 512071d4279SBram Moolenaarsyn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" 513071d4279SBram Moolenaarsyn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod 514071d4279SBram Moolenaarsyn match vimSynPatMod contained "lc=\d\+" 515071d4279SBram Moolenaarsyn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod 516071d4279SBram Moolenaarsyn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" 517071d4279SBram Moolenaarsyn match vimSynNotPatRange contained "\\\\\|\\\[" 518071d4279SBram Moolenaarsyn match vimMtchComment contained '"[^"]\+$' 519d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimSynType 520071d4279SBram Moolenaar 521cfbc5ee4SBram Moolenaar" Syntax: sync {{{2 522071d4279SBram Moolenaar" ============ 523df177f67SBram Moolenaarsyn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion 5246be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror") 525071d4279SBram Moolenaar syn match vimSyncError contained "\i\+" 526cfbc5ee4SBram Moolenaarendif 527071d4279SBram Moolenaarsyn keyword vimSyncC contained ccomment clear fromstart 528071d4279SBram Moolenaarsyn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName 529071d4279SBram Moolenaarsyn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg 530df177f67SBram Moolenaarsyn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber 531071d4279SBram Moolenaarsyn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat 532071d4279SBram Moolenaarsyn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber 533a0f849eeSBram Moolenaarsyn match vimSyncGroupName contained "\h\w*" skipwhite nextgroup=vimSyncKey 534071d4279SBram Moolenaarsyn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup 535a0f849eeSBram Moolenaarsyn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone 536071d4279SBram Moolenaarsyn keyword vimSyncNone contained NONE 537071d4279SBram Moolenaar 538cfbc5ee4SBram Moolenaar" Additional IsCommand, here by reasons of precedence {{{2 539071d4279SBram Moolenaar" ==================== 540071d4279SBram Moolenaarsyn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation 541071d4279SBram Moolenaar 542cfbc5ee4SBram Moolenaar" Highlighting {{{2 543071d4279SBram Moolenaar" ============ 544071d4279SBram Moolenaarsyn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment 5456be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") 5466be7f873SBram Moolenaar syn match vimHiCtermError contained "[^0-9]\i*" 5476be7f873SBram Moolenaarendif 548071d4279SBram Moolenaarsyn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster 549071d4279SBram Moolenaarsyn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster 550071d4279SBram Moolenaar 551071d4279SBram Moolenaarsyn match vimHiGroup contained "\i\+" 552071d4279SBram Moolenaarsyn case ignore 5534770d09aSBram Moolenaarsyn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl 554071d4279SBram Moolenaarsyn keyword vimFgBgAttrib contained none bg background fg foreground 555071d4279SBram Moolenaarsyn case match 556071d4279SBram Moolenaarsyn match vimHiAttribList contained "\i\+" contains=vimHiAttrib 557071d4279SBram Moolenaarsyn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList 558071d4279SBram Moolenaarsyn case ignore 5596be7f873SBram Moolenaarsyn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred magenta red white yellow 5606be7f873SBram Moolenaarsyn match vimHiCtermColor contained "\<color\d\{1,3}\>" 561071d4279SBram Moolenaar 562071d4279SBram Moolenaarsyn case match 563071d4279SBram Moolenaarsyn match vimHiFontname contained "[a-zA-Z\-*]\+" 564071d4279SBram Moolenaarsyn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" 565071d4279SBram Moolenaarsyn match vimHiGuiRgb contained "#\x\{6}" 566071d4279SBram Moolenaar 567cfbc5ee4SBram Moolenaar" Highlighting: hi group key=arg ... {{{2 5685c73622aSBram Moolenaarsyn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation 569071d4279SBram Moolenaarsyn region vimHiKeyList contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||" contains=@vimHiCluster 5706be7f873SBram Moolenaarif !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror") 571071d4279SBram Moolenaar syn match vimHiKeyError contained "\i\+="he=e-1 572cfbc5ee4SBram Moolenaarendif 573071d4279SBram Moolenaarsyn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList 574071d4279SBram Moolenaarsyn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption 575071d4279SBram Moolenaarsyn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList 57683d1b190SBram Moolenaarsyn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError 577071d4279SBram Moolenaarsyn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList 578071d4279SBram Moolenaarsyn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname 5794770d09aSBram Moolenaarsyn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib 580071d4279SBram Moolenaarsyn match vimHiTermcap contained "\S\+" contains=vimNotation 58183d1b190SBram Moolenaarsyn match vimHiNmbr contained '\d\+' 582071d4279SBram Moolenaar 583cfbc5ee4SBram Moolenaar" Highlight: clear {{{2 584071d4279SBram Moolenaarsyn keyword vimHiClear contained clear nextgroup=vimHiGroup 585071d4279SBram Moolenaar 586cfbc5ee4SBram Moolenaar" Highlight: link {{{2 58783d1b190SBram Moolenaarsyn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation 588d960d76dSBram Moolenaarsyn cluster vimFuncBodyList add=vimHiLink 589071d4279SBram Moolenaar 590cfbc5ee4SBram Moolenaar" Control Characters {{{2 591071d4279SBram Moolenaar" ================== 592071d4279SBram Moolenaarsyn match vimCtrlChar "[--]" 593071d4279SBram Moolenaar 594cfbc5ee4SBram Moolenaar" Beginners - Patterns that involve ^ {{{2 595071d4279SBram Moolenaar" ========= 596071d4279SBram Moolenaarsyn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle 597ff1d0d4cSBram Moolenaarsyn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup 598071d4279SBram Moolenaarsyn match vimContinue "^\s*\\" 599071d4279SBram Moolenaarsyn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue 600071d4279SBram Moolenaarsyn match vimCommentTitleLeader '"\s\+'ms=s+1 contained 601071d4279SBram Moolenaar 60218144c84SBram Moolenaar" Searches And Globals: {{{2 60318144c84SBram Moolenaar" ==================== 604e2f98b95SBram Moolenaarsyn match vimSearch '^\s*[/?].*' contains=vimSearchDelim 605e2f98b95SBram Moolenaarsyn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained 6069da7ff70SBram Moolenaarsyn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst 6079da7ff70SBram Moolenaarsyn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst 608e2f98b95SBram Moolenaar 609cfbc5ee4SBram Moolenaar" Scripts : perl,ruby : Benoit Cerrina {{{2 610071d4279SBram Moolenaar" ======= python,tcl: Johannes Zellner 6114b22cdb0SBram Moolenaar" lua 612071d4279SBram Moolenaar 6133577c6faSBram Moolenaar" Allows users to specify the type of embedded script highlighting 6143577c6faSBram Moolenaar" they want: (perl/python/ruby/tcl support) 6153577c6faSBram Moolenaar" g:vimsyn_embed == 0 : don't embed any scripts 616f391327aSBram Moolenaar" g:vimsyn_embed =~# 'l' : embed lua (but only if vim supports it) 617f391327aSBram Moolenaar" g:vimsyn_embed =~# 'm' : embed mzscheme (but only if vim supports it) 618f391327aSBram Moolenaar" g:vimsyn_embed =~# 'p' : embed perl (but only if vim supports it) 619f391327aSBram Moolenaar" g:vimsyn_embed =~# 'P' : embed python (but only if vim supports it) 620f391327aSBram Moolenaar" g:vimsyn_embed =~# 'r' : embed ruby (but only if vim supports it) 621f391327aSBram Moolenaar" g:vimsyn_embed =~# 't' : embed tcl (but only if vim supports it) 6227cba6c06SBram Moolenaarif !exists("g:vimsyn_embed") 623a0f849eeSBram Moolenaar let g:vimsyn_embed= "lmpPr" 6247cba6c06SBram Moolenaarendif 625071d4279SBram Moolenaar 6264b22cdb0SBram Moolenaar" [-- lua --] {{{3 627adc2182cSBram Moolenaarlet s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim") 6284b22cdb0SBram Moolenaarif !filereadable(s:luapath) 629a0f849eeSBram Moolenaar for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n") 630a0f849eeSBram Moolenaar if filereadable(fnameescape(s:luapath)) 631a0f849eeSBram Moolenaar let s:luapath= fnameescape(s:luapath) 6329da7ff70SBram Moolenaar break 6339da7ff70SBram Moolenaar endif 6349da7ff70SBram Moolenaar endfor 6354b22cdb0SBram Moolenaarendif 636f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath) 6374b22cdb0SBram Moolenaar unlet! b:current_syntax 6384b22cdb0SBram Moolenaar exe "syn include @vimLuaScript ".s:luapath 639a0f849eeSBram Moolenaar VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript 640a0f849eeSBram Moolenaar VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript 6414b22cdb0SBram Moolenaar syn cluster vimFuncBodyList add=vimLuaRegion 6424b22cdb0SBram Moolenaarelse 6434b22cdb0SBram Moolenaar syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ 6444b22cdb0SBram Moolenaar syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+ 6454b22cdb0SBram Moolenaarendif 6464b22cdb0SBram Moolenaarunlet s:luapath 6474b22cdb0SBram Moolenaar 648cfbc5ee4SBram Moolenaar" [-- perl --] {{{3 649adc2182cSBram Moolenaarlet s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim") 6505c73622aSBram Moolenaarif !filereadable(s:perlpath) 651a0f849eeSBram Moolenaar for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n") 652a0f849eeSBram Moolenaar if filereadable(fnameescape(s:perlpath)) 653a0f849eeSBram Moolenaar let s:perlpath= fnameescape(s:perlpath) 6549da7ff70SBram Moolenaar break 6559da7ff70SBram Moolenaar endif 6569da7ff70SBram Moolenaar endfor 6575c73622aSBram Moolenaarendif 658f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'p' && has("perl")) && filereadable(s:perlpath) 659071d4279SBram Moolenaar unlet! b:current_syntax 6605c73622aSBram Moolenaar exe "syn include @vimPerlScript ".s:perlpath 661a0f849eeSBram Moolenaar VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript 662a0f849eeSBram Moolenaar VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript 6635c73622aSBram Moolenaar syn cluster vimFuncBodyList add=vimPerlRegion 664c236c16dSBram Moolenaarelse 665c236c16dSBram Moolenaar syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ 666c236c16dSBram Moolenaar syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ 6673577c6faSBram Moolenaarendif 6685c73622aSBram Moolenaarunlet s:perlpath 669071d4279SBram Moolenaar 670cfbc5ee4SBram Moolenaar" [-- ruby --] {{{3 671adc2182cSBram Moolenaarlet s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim") 6725c73622aSBram Moolenaarif !filereadable(s:rubypath) 673a0f849eeSBram Moolenaar for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n") 674a0f849eeSBram Moolenaar if filereadable(fnameescape(s:rubypath)) 675a0f849eeSBram Moolenaar let s:rubypath= fnameescape(s:rubypath) 6769da7ff70SBram Moolenaar break 6779da7ff70SBram Moolenaar endif 6789da7ff70SBram Moolenaar endfor 6795c73622aSBram Moolenaarendif 680f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'r' && has("ruby")) && filereadable(s:rubypath) 681071d4279SBram Moolenaar unlet! b:current_syntax 6825c73622aSBram Moolenaar exe "syn include @vimRubyScript ".s:rubypath 683a0f849eeSBram Moolenaar VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript 684071d4279SBram Moolenaar syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript 6855c73622aSBram Moolenaar syn cluster vimFuncBodyList add=vimRubyRegion 686c236c16dSBram Moolenaarelse 687c236c16dSBram Moolenaar syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ 688c236c16dSBram Moolenaar syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+ 689071d4279SBram Moolenaarendif 6905c73622aSBram Moolenaarunlet s:rubypath 691071d4279SBram Moolenaar 692cfbc5ee4SBram Moolenaar" [-- python --] {{{3 693adc2182cSBram Moolenaarlet s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim") 6945c73622aSBram Moolenaarif !filereadable(s:pythonpath) 695a0f849eeSBram Moolenaar for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n") 696a0f849eeSBram Moolenaar if filereadable(fnameescape(s:pythonpath)) 697a0f849eeSBram Moolenaar let s:pythonpath= fnameescape(s:pythonpath) 6989da7ff70SBram Moolenaar break 6995c73622aSBram Moolenaar endif 7009da7ff70SBram Moolenaar endfor 7019da7ff70SBram Moolenaarendif 702f391327aSBram Moolenaarif g:vimsyn_embed =~# 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath) 703071d4279SBram Moolenaar unlet! b:current_syntax 7045c73622aSBram Moolenaar exe "syn include @vimPythonScript ".s:pythonpath 705a0f849eeSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript 706a0f849eeSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript 707b4ff518dSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript 708b4ff518dSBram Moolenaar VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript 7095c73622aSBram Moolenaar syn cluster vimFuncBodyList add=vimPythonRegion 710c236c16dSBram Moolenaarelse 711fa01c39dSBram Moolenaar syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ 712fa01c39dSBram Moolenaar syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ 7133577c6faSBram Moolenaarendif 7145c73622aSBram Moolenaarunlet s:pythonpath 715071d4279SBram Moolenaar 716cfbc5ee4SBram Moolenaar" [-- tcl --] {{{3 717a0f849eeSBram Moolenaarif has("win32") || has("win95") || has("win64") || has("win16") 718a0f849eeSBram Moolenaar " apparently has("tcl") has been hanging vim on some windows systems with cygwin 719a0f849eeSBram Moolenaar let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$') 720a0f849eeSBram Moolenaarelse 721a0f849eeSBram Moolenaar let s:trytcl= 1 722a0f849eeSBram Moolenaarendif 723a6878375SBram Moolenaarif s:trytcl 724adc2182cSBram Moolenaar let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim") 7255c73622aSBram Moolenaar if !filereadable(s:tclpath) 726a0f849eeSBram Moolenaar for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n") 727a0f849eeSBram Moolenaar if filereadable(fnameescape(s:tclpath)) 728a0f849eeSBram Moolenaar let s:tclpath= fnameescape(s:tclpath) 7299da7ff70SBram Moolenaar break 7309da7ff70SBram Moolenaar endif 7319da7ff70SBram Moolenaar endfor 7325c73622aSBram Moolenaar endif 733f391327aSBram Moolenaar if (g:vimsyn_embed =~# 't' && has("tcl")) && filereadable(s:tclpath) 734071d4279SBram Moolenaar unlet! b:current_syntax 7355c73622aSBram Moolenaar exe "syn include @vimTclScript ".s:tclpath 736a0f849eeSBram Moolenaar VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript 737a0f849eeSBram Moolenaar VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript 7385c73622aSBram Moolenaar syn cluster vimFuncBodyList add=vimTclScript 739c236c16dSBram Moolenaar else 740c236c16dSBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ 741c236c16dSBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+ 7423577c6faSBram Moolenaar endif 7435c73622aSBram Moolenaar unlet s:tclpath 744a6878375SBram Moolenaarelse 745a6878375SBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ 746a6878375SBram Moolenaar syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+ 747a6878375SBram Moolenaarendif 748a6878375SBram Moolenaarunlet s:trytcl 749071d4279SBram Moolenaar 7508299df96SBram Moolenaar" [-- mzscheme --] {{{3 751adc2182cSBram Moolenaarlet s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim") 7525c73622aSBram Moolenaarif !filereadable(s:mzschemepath) 753a0f849eeSBram Moolenaar for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n") 754a0f849eeSBram Moolenaar if filereadable(fnameescape(s:mzschemepath)) 755a0f849eeSBram Moolenaar let s:mzschemepath= fnameescape(s:mzschemepath) 7569da7ff70SBram Moolenaar break 7579da7ff70SBram Moolenaar endif 7589da7ff70SBram Moolenaar endfor 7595c73622aSBram Moolenaarendif 760f391327aSBram Moolenaarif (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath) 7618299df96SBram Moolenaar unlet! b:current_syntax 7628299df96SBram Moolenaar let iskKeep= &isk 7635c73622aSBram Moolenaar exe "syn include @vimMzSchemeScript ".s:mzschemepath 7648299df96SBram Moolenaar let &isk= iskKeep 765a0f849eeSBram Moolenaar VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript 766a0f849eeSBram Moolenaar VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript 7675c73622aSBram Moolenaar syn cluster vimFuncBodyList add=vimMzSchemeRegion 768c236c16dSBram Moolenaarelse 769c236c16dSBram Moolenaar syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ 770c236c16dSBram Moolenaar syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ 7713577c6faSBram Moolenaarendif 7725c73622aSBram Moolenaarunlet s:mzschemepath 7738299df96SBram Moolenaar 774cfbc5ee4SBram Moolenaar" Synchronize (speed) {{{2 775071d4279SBram Moolenaar"============ 7763577c6faSBram Moolenaarif exists("g:vimsyn_minlines") 7773577c6faSBram Moolenaar exe "syn sync minlines=".g:vimsyn_minlines 778071d4279SBram Moolenaarendif 7793577c6faSBram Moolenaarif exists("g:vimsyn_maxlines") 7803577c6faSBram Moolenaar exe "syn sync maxlines=".g:vimsyn_maxlines 781071d4279SBram Moolenaarelse 782071d4279SBram Moolenaar syn sync maxlines=60 783071d4279SBram Moolenaarendif 784071d4279SBram Moolenaarsyn sync linecont "^\s\+\\" 785071d4279SBram Moolenaarsyn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]" 786071d4279SBram Moolenaar 7875c73622aSBram Moolenaar" ==================== 788cfbc5ee4SBram Moolenaar" Highlighting Settings {{{2 789071d4279SBram Moolenaar" ==================== 790071d4279SBram Moolenaar 7913577c6faSBram Moolenaarif !exists("g:vimsyn_noerror") 792cfbc5ee4SBram Moolenaar hi def link vimBehaveError vimError 793cfbc5ee4SBram Moolenaar hi def link vimCollClassErr vimError 794cfbc5ee4SBram Moolenaar hi def link vimErrSetting vimError 795c236c16dSBram Moolenaar hi def link vimEmbedError vimError 796cfbc5ee4SBram Moolenaar hi def link vimFTError vimError 797cfbc5ee4SBram Moolenaar hi def link vimFunctionError vimError 7988299df96SBram Moolenaar hi def link vimFunc vimError 799cfbc5ee4SBram Moolenaar hi def link vimHiAttribList vimError 800cfbc5ee4SBram Moolenaar hi def link vimHiCtermError vimError 801cfbc5ee4SBram Moolenaar hi def link vimHiKeyError vimError 802cfbc5ee4SBram Moolenaar hi def link vimKeyCodeError vimError 803cfbc5ee4SBram Moolenaar hi def link vimMapModErr vimError 804cfbc5ee4SBram Moolenaar hi def link vimSubstFlagErr vimError 805cfbc5ee4SBram Moolenaar hi def link vimSynCaseError vimError 8063577c6faSBram Moolenaar hi def link vimBufnrWarn vimWarn 807cfbc5ee4SBram Moolenaarendif 808cfbc5ee4SBram Moolenaar 809e37d50a5SBram Moolenaarhi def link vimAbb vimCommand 810cfbc5ee4SBram Moolenaarhi def link vimAddress vimMark 811a0f849eeSBram Moolenaarhi def link vimAugroupError vimError 812071d4279SBram Moolenaarhi def link vimAugroupKey vimCommand 81383d1b190SBram Moolenaarhi def link vimAuHighlight vimHighlight 814071d4279SBram Moolenaarhi def link vimAutoCmdOpt vimOption 815071d4279SBram Moolenaarhi def link vimAutoCmd vimCommand 81683d1b190SBram Moolenaarhi def link vimAutoEvent Type 817071d4279SBram Moolenaarhi def link vimAutoSet vimCommand 81883d1b190SBram Moolenaarhi def link vimBehaveModel vimBehave 819071d4279SBram Moolenaarhi def link vimBehave vimCommand 82083d1b190SBram Moolenaarhi def link vimBracket Delimiter 82183d1b190SBram Moolenaarhi def link vimCmplxRepeat SpecialChar 82283d1b190SBram Moolenaarhi def link vimCommand Statement 82383d1b190SBram Moolenaarhi def link vimComment Comment 824071d4279SBram Moolenaarhi def link vimCommentString vimString 82583d1b190SBram Moolenaarhi def link vimCommentTitle PreProc 826071d4279SBram Moolenaarhi def link vimCondHL vimCommand 82783d1b190SBram Moolenaarhi def link vimContinue Special 82883d1b190SBram Moolenaarhi def link vimCtrlChar SpecialChar 829071d4279SBram Moolenaarhi def link vimEchoHLNone vimGroup 830071d4279SBram Moolenaarhi def link vimEchoHL vimCommand 83183d1b190SBram Moolenaarhi def link vimElseIfErr Error 832071d4279SBram Moolenaarhi def link vimElseif vimCondHL 83383d1b190SBram Moolenaarhi def link vimEnvvar PreProc 83483d1b190SBram Moolenaarhi def link vimError Error 83583d1b190SBram Moolenaarhi def link vimFBVar vimVar 836071d4279SBram Moolenaarhi def link vimFgBgAttrib vimHiAttrib 83783d1b190SBram Moolenaarhi def link vimFold Folded 838071d4279SBram Moolenaarhi def link vimFTCmd vimCommand 839071d4279SBram Moolenaarhi def link vimFTOption vimSynType 840071d4279SBram Moolenaarhi def link vimFuncKey vimCommand 84183d1b190SBram Moolenaarhi def link vimFuncName Function 84283d1b190SBram Moolenaarhi def link vimFuncSID Special 84383d1b190SBram Moolenaarhi def link vimFuncVar Identifier 844071d4279SBram Moolenaarhi def link vimGroupAdd vimSynOption 8456be7f873SBram Moolenaarhi def link vimGroupName vimGroup 846071d4279SBram Moolenaarhi def link vimGroupRem vimSynOption 84783d1b190SBram Moolenaarhi def link vimGroupSpecial Special 84883d1b190SBram Moolenaarhi def link vimGroup Type 84983d1b190SBram Moolenaarhi def link vimHiAttrib PreProc 8506be7f873SBram Moolenaarhi def link vimHiClear vimHighlight 851071d4279SBram Moolenaarhi def link vimHiCtermFgBg vimHiTerm 852071d4279SBram Moolenaarhi def link vimHiCTerm vimHiTerm 853071d4279SBram Moolenaarhi def link vimHighlight vimCommand 854071d4279SBram Moolenaarhi def link vimHiGroup vimGroupName 855071d4279SBram Moolenaarhi def link vimHiGuiFgBg vimHiTerm 856071d4279SBram Moolenaarhi def link vimHiGuiFont vimHiTerm 857071d4279SBram Moolenaarhi def link vimHiGuiRgb vimNumber 858071d4279SBram Moolenaarhi def link vimHiGui vimHiTerm 85983d1b190SBram Moolenaarhi def link vimHiNmbr Number 860071d4279SBram Moolenaarhi def link vimHiStartStop vimHiTerm 86183d1b190SBram Moolenaarhi def link vimHiTerm Type 862071d4279SBram Moolenaarhi def link vimHLGroup vimGroup 86383d1b190SBram Moolenaarhi def link vimHLMod PreProc 864071d4279SBram Moolenaarhi def link vimInsert vimString 86513d5aeefSBram Moolenaarhi def link vimIskSep Delimiter 866071d4279SBram Moolenaarhi def link vimKeyCode vimSpecFile 86783d1b190SBram Moolenaarhi def link vimKeyword Statement 868071d4279SBram Moolenaarhi def link vimLet vimCommand 869071d4279SBram Moolenaarhi def link vimLineComment vimComment 870071d4279SBram Moolenaarhi def link vimMapBang vimCommand 871071d4279SBram Moolenaarhi def link vimMapModKey vimFuncSID 872071d4279SBram Moolenaarhi def link vimMapMod vimBracket 873071d4279SBram Moolenaarhi def link vimMap vimCommand 87483d1b190SBram Moolenaarhi def link vimMark Number 875071d4279SBram Moolenaarhi def link vimMarkNumber vimNumber 876071d4279SBram Moolenaarhi def link vimMenuMod vimMapMod 877071d4279SBram Moolenaarhi def link vimMenuNameMore vimMenuName 87883d1b190SBram Moolenaarhi def link vimMenuName PreProc 879071d4279SBram Moolenaarhi def link vimMtchComment vimComment 88005159a0cSBram Moolenaarhi def link vimNorm vimCommand 88183d1b190SBram Moolenaarhi def link vimNotation Special 8825c73622aSBram Moolenaarhi def link vimNotFunc vimCommand 883071d4279SBram Moolenaarhi def link vimNotPatSep vimString 88483d1b190SBram Moolenaarhi def link vimNumber Number 88583d1b190SBram Moolenaarhi def link vimOperError Error 88683d1b190SBram Moolenaarhi def link vimOper Operator 88783d1b190SBram Moolenaarhi def link vimOption PreProc 88883d1b190SBram Moolenaarhi def link vimParenSep Delimiter 889071d4279SBram Moolenaarhi def link vimPatSepErr vimPatSep 8905c73622aSBram Moolenaarhi def link vimPatSepR vimPatSep 89183d1b190SBram Moolenaarhi def link vimPatSep SpecialChar 892071d4279SBram Moolenaarhi def link vimPatSepZone vimString 8935c73622aSBram Moolenaarhi def link vimPatSepZ vimPatSep 89483d1b190SBram Moolenaarhi def link vimPattern Type 895071d4279SBram Moolenaarhi def link vimPlainMark vimMark 896071d4279SBram Moolenaarhi def link vimPlainRegister vimRegister 89783d1b190SBram Moolenaarhi def link vimRegister SpecialChar 89883d1b190SBram Moolenaarhi def link vimScriptDelim Comment 89983d1b190SBram Moolenaarhi def link vimSearchDelim Statement 900e2f98b95SBram Moolenaarhi def link vimSearch vimString 90183d1b190SBram Moolenaarhi def link vimSep Delimiter 902071d4279SBram Moolenaarhi def link vimSetMod vimOption 90383d1b190SBram Moolenaarhi def link vimSetSep Statement 904071d4279SBram Moolenaarhi def link vimSetString vimString 90583d1b190SBram Moolenaarhi def link vimSpecFile Identifier 906071d4279SBram Moolenaarhi def link vimSpecFileMod vimSpecFile 90783d1b190SBram Moolenaarhi def link vimSpecial Type 90883d1b190SBram Moolenaarhi def link vimStatement Statement 909071d4279SBram Moolenaarhi def link vimStringCont vimString 91083d1b190SBram Moolenaarhi def link vimString String 91183d1b190SBram Moolenaarhi def link vimSubst1 vimSubst 91283d1b190SBram Moolenaarhi def link vimSubstDelim Delimiter 91383d1b190SBram Moolenaarhi def link vimSubstFlags Special 91483d1b190SBram Moolenaarhi def link vimSubstSubstr SpecialChar 915071d4279SBram Moolenaarhi def link vimSubstTwoBS vimString 916071d4279SBram Moolenaarhi def link vimSubst vimCommand 91783d1b190SBram Moolenaarhi def link vimSynCaseError Error 91883d1b190SBram Moolenaarhi def link vimSynCase Type 91983d1b190SBram Moolenaarhi def link vimSyncC Type 92083d1b190SBram Moolenaarhi def link vimSyncError Error 921071d4279SBram Moolenaarhi def link vimSyncGroupName vimGroupName 922071d4279SBram Moolenaarhi def link vimSyncGroup vimGroupName 92383d1b190SBram Moolenaarhi def link vimSyncKey Type 92483d1b190SBram Moolenaarhi def link vimSyncNone Type 925071d4279SBram Moolenaarhi def link vimSynContains vimSynOption 92683d1b190SBram Moolenaarhi def link vimSynError Error 927071d4279SBram Moolenaarhi def link vimSynKeyContainedin vimSynContains 928071d4279SBram Moolenaarhi def link vimSynKeyOpt vimSynOption 929071d4279SBram Moolenaarhi def link vimSynMtchGrp vimSynOption 930071d4279SBram Moolenaarhi def link vimSynMtchOpt vimSynOption 931071d4279SBram Moolenaarhi def link vimSynNextgroup vimSynOption 932071d4279SBram Moolenaarhi def link vimSynNotPatRange vimSynRegPat 93383d1b190SBram Moolenaarhi def link vimSynOption Special 934071d4279SBram Moolenaarhi def link vimSynPatRange vimString 935071d4279SBram Moolenaarhi def link vimSynRegOpt vimSynOption 936071d4279SBram Moolenaarhi def link vimSynRegPat vimString 93783d1b190SBram Moolenaarhi def link vimSynReg Type 938071d4279SBram Moolenaarhi def link vimSyntax vimCommand 939071d4279SBram Moolenaarhi def link vimSynType vimSpecial 94083d1b190SBram Moolenaarhi def link vimTodo Todo 9415c73622aSBram Moolenaarhi def link vimUnmap vimMap 94283d1b190SBram Moolenaarhi def link vimUserAttrbCmpltFunc Special 943071d4279SBram Moolenaarhi def link vimUserAttrbCmplt vimSpecial 944071d4279SBram Moolenaarhi def link vimUserAttrbKey vimOption 945071d4279SBram Moolenaarhi def link vimUserAttrb vimSpecial 946b4ff518dSBram Moolenaarhi def link vimUserAttrbError Error 947e2719096SBram Moolenaarhi def link vimUserCmdError Error 94883d1b190SBram Moolenaarhi def link vimUserCommand vimCommand 9495c73622aSBram Moolenaarhi def link vimUserFunc Normal 9506be7f873SBram Moolenaarhi def link vimVar Identifier 9513577c6faSBram Moolenaarhi def link vimWarn WarningMsg 952071d4279SBram Moolenaar 953cfbc5ee4SBram Moolenaar" Current Syntax Variable: {{{2 954071d4279SBram Moolenaarlet b:current_syntax = "vim" 9556be7f873SBram Moolenaar 9566be7f873SBram Moolenaar" --------------------------------------------------------------------- 9576be7f873SBram Moolenaar" Cleanup: {{{1 958a0f849eeSBram Moolenaardelc VimFolda 959a0f849eeSBram Moolenaardelc VimFoldf 960a0f849eeSBram Moolenaardelc VimFoldl 961a0f849eeSBram Moolenaardelc VimFoldm 962a0f849eeSBram Moolenaardelc VimFoldp 963a0f849eeSBram Moolenaardelc VimFoldP 964a0f849eeSBram Moolenaardelc VimFoldr 965a0f849eeSBram Moolenaardelc VimFoldt 9666be7f873SBram Moolenaarlet &cpo = s:keepcpo 9676be7f873SBram Moolenaarunlet s:keepcpo 968071d4279SBram Moolenaar" vim:ts=18 fdm=marker 969