2 " Language: VIMperator configuration file
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
4 " Latest Revision: 2008 August 19
6 if exists("b:current_syntax")
13 syn include @javascriptTop syntax/javascript.vim
14 unlet b:current_syntax
16 syn keyword vimperatorTodo FIXME NOTE TODO XXX contained
17 syn match vimperatorComment +".*$+ contains=vimperatorTodo,@Spell
19 syn region vimperatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline
21 syn match vimperatorLineComment +^\s*".*$+ contains=vimperatorTodo,@Spell
23 syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] au[tocmd] b[uffer] ba[ck] bd[elete] beep bma[rk] bmarks buffers
24 \ bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd cuna[bbrev] cm[ap] cmapc[lear] cno[remap] comc[lear] com[mand] cu[nmap]
25 \ delbm[arks] delc[ommand] delmac[ros] delm[arks] delqm[arks] dia[log] dl downl[oads] e[dit] ec[ho] echoe[rr] em[enu]
26 \ exe[cute] exu[sage] files fo[rward] fw h[elp] ha[rdcopy] hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap]
27 \ iuna[bbrev] iu[nmap] javas[cript] ju[mps] js let ls macros ma[rk] map mapc[lear] marks mkv[imperatorrc] no[remap]
28 \ noh[lsearch] norm[al] o[pen] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences] prefs pwd q[uit] qa[ll] qma[rk] qmarks
29 \ quita[ll] re[draw] re[load] reloada[ll] res[tart] run sav[eas] sb[ar] sb[open] sbcl[ose] se[t] setg[lobal] setl[ocal]
30 \ sideb[ar] so[urce] st[op] tN[ext] t[open] tab tabd[uplicate] tabN[ext] tabc[lose] tabe[dit] tabfir[st] tabl[ast] tabm[ove]
31 \ tabn[ext] tabnew tabo[nly] tabopen tabp[revious] tabr[ewind] tabs time tn[ext] tp[revious] u[ndo] una[bbreviate] undoa[ll]
32 \ unl[et] unm[ap] ve[rsion] vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wqa[ll] wq xa[ll]
36 syn match vimperatorCommand "!" contained
39 syn match vimperatorCommandWrapper "\%(^\s*:\=\)\@<=\%(!\|\h\w*\>\)" contains=vimperatorCommand
41 syn region vimperatorSet matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<set\=\>" end="$" keepend oneline contains=vimperatorOption
42 syn keyword vimperatorOption activate act activelinkfgcolor alfc activelinkbgcolor albc complete cpt defsearch ds editor
43 \ extendedhinttags eht focuscontent fc nofocuscontent nofc fullscreen fs nofullscreen nofs guioptions go hintmatching hm
44 \ hintstyle hs hinttags ht hinttimeout hto history hi hlsearch hls nohlsearch nohls hlsearchstyle hlss incsearch is
45 \ noincsearch nois ignorecase ic noignorecase noic insertmode im noinsertmode noim laststatus ls linkbgcolor lbc linkfgcolor
46 \ lfc linksearch lks nolinksearch nolks more newtab nextpattern nomore pageinfo pa popups pps preload nopreload previewheight
47 \ pvh previouspattern online noonline scroll scr shell sh shellcmdflag shcf showmode smd noshowmode nosmd showstatuslinks ssli
48 \ showtabline stal smartcase scs nosmartcase noscs suggestengines titlestring usermode um nousermode noum urlseparator verbose
49 \ vbs visualbell vb novisualbell novb visualbellstyle wildmode wim wildoptions wop wordseparators wsp
52 syn region vimperatorJavascript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline
53 syn region vimperatorJavascript matchgroup=vimperatorJavascriptDelimiter
54 \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold
56 syn region vimperatorMap matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<map\>" end="$" keepend oneline contains=vimperatorKeySym
58 syn match vimperatorKeySym "<[0-9A-Za-z-]\+>"
60 " Note: match vim.vim highlighting groups
61 hi def link vimperatorCommand Statement
62 hi def link vimperatorComment Comment
63 hi def link vimperatorJavascriptDelimiter Delimiter
64 hi def link vimperatorKeySym Special
65 hi def link vimperatorLineComment Comment
66 hi def link vimperatorOption PreProc
67 hi def link vimperatorString String
68 hi def link vimperatorTodo Todo
70 let b:current_syntax = "vimperator"
75 " vim: tw=130 et ts=4 sw=4: