prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
16 lines (15 loc) • 11.3 kB
JavaScript
import { a as languages } from "../../core-8vQkh0Rd.js";
import { i as clikePunctuation } from "../../patterns-C0vJBvXO.js";
//#region src/prism/languages/vim.js
languages.vim = {
"string": /"(?:\\.|[^\\\n"])*"|'(?:[^\n']|'')*'/,
"comment": /".*/,
"function": /\b\w+(?=\()/,
"keyword": /\b(?:N|(?:[bclstw]|pt|sb|tab)?[Nn]ext|P|[Pp]rint|X|XMLent|XMLns|ab[co]?|abbreviate|aboveleft|ar|arg[adeglsu]|argadd|argdelete|argdo|argedit|argglobal|arglocal|argument|as|ascii|bN?|badd?|ba|ball|bd|b?delete|b?el?|belowright|bf|[cl]first|bl|bm|bmodified|bn|botright|bp|[clw]previous|br|brea|break[adl]?|breakadd|breakdel|breaklist|[cl]rewind|br?o|browse|bufdo|buffers?|bun|bunload|bw|bwipeout|c[Nabcdefglnopqruw]?|cNfcNfile|cabbrev|cabc|c?abclear|ca[dt]|cadd[bf]|caddbuffer|[cl](?:add|get)?expr|caddfile|c?all?|catch|cbuffer|ccl|[clp]?close|center|cex|cfile|cfir|cget[be]|cgetbuffer|cgetfile|changes?|ch[de]|chdir|checkpath|checkt|checktime|cl[ao]|cl[ai]st|cmapc|[cilnosvx]mapclear|cnew|cnewer|cnf|cnfile|[ci]?norea|[ci]?noreabbrev|colo?|colder|colorscheme|com[cp]|comclear|compiler|conf?|confirm|continue|copen?|copy|cpf|cpfile|cquit|cuna|[ci]unabbrev|[cilnosvx]?unmap|[cl]window|debugg|debuggreedy|del[cfm]|delcommand|delfunction|delmarks|diff(?:[gu]|get|off|patch|put?|split|this|update)|dig?|digraphs|display|dj?|[dit]jump|dl|[dil]?list|dr|drop|dsearch|dsp?|[div]?split|earlier|echo[emn]|echoerr|echomsg|edit|else|elseif?|em|emenu|en|endfor?|endfun|endfunction|endi?f|end[tw]|endtry|endwhile|[elv]new?|exit?|exu?|exusage|files?|filetype|fin[adi]?|finally|finish|fi[rx]|fixdel|f|fold[cdo]?|foldclose|folddoc|folddoclosed|folddoopen|foldopen|for?|fun?|function|go|goto|gr|ha?|hardcopy|help[fgt]?|helpfind|helptags|hide?|his|history|ia|iabbrev|iabc|iabclear|i[fjlnu]|imapc|isearch|isp|iuna|ju?|join|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|lNf?|lNfile|lad?|ladd[bf]|laddbuffer|laddfile|lan|language|later|lb?|lbuffer|lc[dhl]?|lchdir|lefta?|leftabove|le[tx]|lf|lfile|lfir|lget[be]|lgetbuffer|lgetfile|lgr?|l?grepa?|l?grepadd|lh|l?helpgrep|ll[ai]?|llast|lm|l?make?|[lsx]mapc?|lnewer|lnf?|lnfile|lnoremap|lo[clp]?|loadview|lockmarks|lockv|lockvar|lolder|lopen|lpf?|lpfile|lr|ls|lt|[lp]tag|lu|lv|l?vimgrepa?|l?vimgrepadd|lw|m|marks?|mat?|match|menut|menutranslate|mkexrc|mksession|mksp?|mkspell|mkv?|mkview?|mkvimrc|mode?|move|mzf?|mzfile|mzscheme|n|nbkey|new|[no]mapc|noh|nohlsearch|nun?|number|on?|only|open|opt|options|ou|pc?|ped?|pedit|perl|perldo?|po|popup?|pp|pp?op|preserve|prev?|profd?|profdel|profile|prompt[fr]|promptfind|promptrepl|ps|psearch|pt[Nafjlnprs]|p?tfirst|[ps]tjump|p?tlast|p?tprevious|p?trewind|[ps]?tselect|put?|pwd?|pyf?|pyfile|python|quita?|quitall|read|re[cdgstw]|recover|redir?|red[or]|redraws?|redrawstatus|registers|resize|retab|retu|return|ri?|rightb?|rightbelow|ru|ruby?|rubydo?|rubyf|rubyfile|runtime|rv|rviminfo|sN|sall?|san?|sandbox|sargument|sav|saveas|sb[Naflmnpr]?|sball|s?b?first|s?b?last|sbmodified|s?b?previous|s?b?rewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|set?|set[fgl]|setfiletype|setglobal|setlocal|sf|sfind|sfir|sh|shell|sign|si[lm]|silent|simalt|sla?|sleep|smagic|sme?|smenu|sni?|sniff|snomagic|snor?|snoremap|snoreme|snoremenu|so|sort?|source|spe?|spell[diruw]|spelldump|spellgood|spellinfo|spellrepall|spellundo|spellwrong|spr|sre|sta?|sta[gr]|start[gr]|startgreplace|startinsert|startreplace|st[js]|stopi?|stopinsert|sunhide|sunm?|sus|suspend|sv|sview|syncbind|tN?|tab?|tab(?:[Ncdeflmnoprs]|close|do|edit|find|fir|first|last|move|new|only|previous|rewind)|tags?|tcldo?|tclf?|tclfile|t[cefhjlmnopsu]|tearoff|throw|tmenu|topleft|try?|tunmenu|un[ahm]|unabbreviate|undoj?|undojoin|undol|undolist|unhide|unlet|unlo|unlockvar|up?|update|ve|ver[bt]|verbose|version|vertical|view?|vi[mu]?|visual|viusage|vmapc|vs|vu|wN?|wa|[wx]all|wh|while|win[cp]?|wincmd|windo|winpos|winsize|wn|wp|w?qa?|w?qall|write|ws|wsverb|wv|wviminfo|xa?|xit|xme?|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|y|yank)\b/,
"builtin": /\b(?:acd|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ar?i|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|awa?|back(?:ground|space|up|upcopy|updir|upext|upskip)|balloondelay|ballooneval|balloonexpr|[bv]dir|bdlay|beval|bex|[bp]expr|bg|bh|bin|binary|biosk|bioskey|bkc?|bomb|breakat|brk|browsedir|bsk?|bsdir|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|cin?|cindent|cin[kow]|cinkeys|cinoptions|cinwords|clipboard|cmdheight|cmdwinheight|cm[ps]|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|c[op]t|cpo|cpoptions|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|csto?|csverb|cu[cl]|cursorcolumn|cursorline|cwh|debug|deco|de[fx]|define|delcombine|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|di[pr]|directory|dy|e[abdfikpt]|ead|eadirection|edcompatible|efm|enc|encoding|endofline|eol|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|eventignore|expandtab|exrc|fc[ls]|fd[ceilmnot]|fdls|fe[nx]|fencs?|ffs?|fileencodings?|fileformats?|fillchars|fk|fkmap|flp|fm[lr]|fold(?:column|enable|expr|ignore|level|levelstart|marker|method|minlines|nestmax|text)|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gf[mnsw]|ghr|gp|grepformat|grepprg|gt[lt]|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hkmapp?|hkp?|hlg?|hls|hlsearch|ic|icon|iconstring|ignorecase|imactivatekey|imak|im[cdis]?|imcmdline|imdisable|iminsert|imsearch|in[cf]|include|includeexpr|incsearch|ind[ek]|indentexpr|indentkeys|inex|infercase|insertmode|inv(?:acd|ai|akm|allowrevins|altkeymap|anti|antialias|ari?|arab|arabic|arabicshape|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|awa?|backup|ballooneval|beval|bin|binary|biosk|bioskey|bk|bl|bomb|buflisted|cf|cin?|cindent|compatible|confirm|consk|conskey|copyindent|cp|cscopetag|cscopeverbose|cst|csverb|cu[cl]|cursorcolumn|cursorline|deco|delcombine|dg|diff|digraph|disable|e[abdktx]|edcompatible|endofline|eol|equalalways|errorbells|esckeys|expandtab|exrc|fen|fk|fkmap|foldenable|gd|gdefault|guipty|hid|hidden|hkmapp?|hkp?|hls|hlsearch|ic|icon|ignorecase|im[cd]?|imcmdline|incsearch|inf|infercase|insertmode|is|joinspaces|js|lazyredraw|lbr|linebreak|lis[pt]|loadplugins|lpl|lz|ma|macatsui|magic|mh|ml|mod|modeline|modifiable|modified|more|mousef|mousefocus|mousehide|nu|number|odev|opendevice|paste|pi|preserveindent|previewwindow|prompt|pvw|readonly|remap|restorescreen|revins|ri|rightleft|rightleftcmd|rlc?|ro|rs|ru|ruler|sb|sc[bs]?|scrollbind|secure|sft|shellslash|shelltemp|shiftround|shortname|showcmd|showfulltag|showmatch|showmode|si|smartcase|smartindent|smarttab|smd?|sn|sol|spell|splitbelow|splitright|sp?r|ssl|s?ta|startofline|stmp|swapfile|swf|tagbsearch|tagrelative|tagstack|tb[is]|tbidi|termbidi|terse|textauto|textmode|tf|tgst|tildeop|title|top?|tr|tt?imeout|ttybuiltin|ttyfast|tx|vb|visualbell|wa|warn|wb|weirdinvert|wf[hw]|wildmenu|winfixheight|winfixwidth|wiv|wmnu|wrap|wrapscan|write|writeany|writebackup|ws)|isf|isfname|is[ik]|isident|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|kmp?|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|mls?|mm[dpt]?|modelines?|modifiable|modified|more|mouse[fmst]?|mousefocus|mousehide|mousemodel|mouseshape|mousetime|mps?|msm|mzq|mzquantum|nf|no(?:acd|ai|akm|allowrevins|altkeymap|anti|antialias|arab|arabic|arabicshape|ari?|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|awa?|backup|ballooneval|beval|bin|binary|biosk|bioskey|bk|bl|bomb|buflisted|cf|cin?|cindent|compatible|confirm|consk|conskey|copyindent|cp|cscopetag|cscopeverbose|cst|csverb|cu[cl]|cursorcolumn|cursorline|deco|delcombine|dg|diff|digraph|disable|e[abdktx]|edcompatible|endofline|eol|equalalways|errorbells|esckeys|expandtab|exrc|fen|fk|fkmap|foldenable|gd|gdefault|guipty|hid|hidden|hkmapp?|hkp?|hls|ic|icon|ignorecase|im[cd]?|imcmdline|incsearch|inf|infercase|insertmode|is|joinspaces|js|lazyredraw|lbr|linebreak|lis[pt]|loadplugins|lpl|lz|ma|macatsui|magic|mh|ml|mod|modeline|modifiable|modified|more|mousef|mousefocus|mousehide|nu|number|odev|opendevice|paste|pi|preserveindent|previewwindow|prompt|pvw|readonly|remap|restorescreen|revins|ri|rightleft|rightleftcmd|rlc?|ro|rs|ru|ruler|sb|sc[bs]?|scrollbind|secure|sft|shellslash|shelltemp|shiftround|shortname|showcmd|showfulltag|showmatch|showmode|si|smartcase|smartindent|smarttab|smd?|sn|sol|spell|splitbelow|splitright|sp?r|ssl|s?ta|startofline|stmp|swapfile|swf|tagbsearch|tagrelative|tagstack|tb[is]|tbidi|termbidi|terse|textauto|textmode|tf|tgst|tildeop|title|top?|tr|tt?imeout|ttybuiltin|ttyfast|tx|vb|visualbell|wa|warn|wb|weirdinvert|wf[hw]|wildmenu|winfixheight|winfixwidth|wiv|wmnu|wrap|wrapscan|write|writeany|writebackup|ws)|nrformats|numberwidth|nuw|[op]dev|of[tu]|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|penc|pex|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|print(?:device|encoding|expr|font|header|mbcharset|mbfont|options)|prompt|pt|pumheight|pv[hw]|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rlc?|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc[br]?|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shell(?:cmdflag|pipe|redir|slash|temp|type|x?quote)|shiftround|shiftwidth|sh[mq]|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|sm[cd]|softtabstop|sol|spc|spell(?:capcheck|file|lang|suggest)?|sp[fls]|splitbelow|splitright|srr?|ssl?|ssop|sta?l|startofline|statusline|stmp|sua?|suffixes|suffixesadd|swapfile|swapsync|sw[bfs]?|switchbuf|sxq|syn|synmaxcol|syntax|t_(?:AB|AF|AL|CS|CV|Ce|Co|Cs|DL|EI|[FKk]\d|IE|IS|K[A-L]|RI|RV|SI|Sb|Sf|WP|WS|ZH|ZR|al|bc|cd|ce|cl|cm|cs|da|db|dl|fs|k[BDINPbdehlrsu]|le|mb|md|me|mr|ms|nd|op|se|so|sr|te|ti|ts|ue|us|ut|vb|ve|vi|vs|xs)|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tbi?s?|tbidi|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|[tvw]op|tpm|ts[lr]|tt?imeout|tt?imeoutlen|ttm|ttybuiltin|ttyfast|ttym?|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vbs?|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|wak|warn|wb|wcm?|wd|weirdinvert|wf[hw]|whichwrap|wig?|wildcharm?|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wi[vw]|wm[hw]?|wmnu|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,
"number": /\b(?:0x[a-f\d]+|\d+(?:\.\d+)?)\b/i,
"operator": /&&|\|\||[.+-]=?|[!=][=~][#?]?|[<>]=?[#?]?|[%?!=/*]|\bis(?:not)?\b/,
"punctuation": clikePunctuation
};
//#endregion
//# sourceMappingURL=vim.js.map