1" Vim syntax file 2" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc ) 3" Maintainer: Magnus Woldrich <[email protected]> 4" URL: http://github.com/trapd00r/vim-syntax-ratpoison 5" Last Change: 2011 Apr 11 6" Previous Maintainer: Doug Kearns <[email protected]> 7 8" For version 5.x: Clear all syntax items 9" For version 6.x: Quit when a syntax file was already loaded 10if version < 600 11 syntax clear 12elseif exists("b:current_syntax") 13 finish 14endif 15 16syn match ratpoisonComment "^\s*#.*$" contains=ratpoisonTodo 17 18syn keyword ratpoisonTodo TODO NOTE FIXME XXX contained 19 20syn case ignore 21syn keyword ratpoisonBooleanArg on off contained 22syn case match 23 24syn keyword ratpoisonCommandArg abort addhook alias banish chdir contained 25syn keyword ratpoisonCommandArg clrunmanaged cnext colon compat cother contained 26syn keyword ratpoisonCommandArg cprev curframe dedicate definekey delete contained 27syn keyword ratpoisonCommandArg delkmap describekey echo escape exec contained 28syn keyword ratpoisonCommandArg fdump focus focusdown focuslast focusleft contained 29syn keyword ratpoisonCommandArg focusprev focusright focusup frestore fselect contained 30syn keyword ratpoisonCommandArg gdelete getenv getsel gmerge gmove contained 31syn keyword ratpoisonCommandArg gnew gnewbg gnext gprev gravity contained 32syn keyword ratpoisonCommandArg groups gselect help hsplit inext contained 33syn keyword ratpoisonCommandArg info iother iprev kill lastmsg contained 34syn keyword ratpoisonCommandArg license link listhook meta msgwait contained 35syn keyword ratpoisonCommandArg newkmap newwm next nextscreen number contained 36syn keyword ratpoisonCommandArg only other prev prevscreen prompt contained 37syn keyword ratpoisonCommandArg putsel quit ratclick rathold ratrelwarp contained 38syn keyword ratpoisonCommandArg ratwarp readkey redisplay redo remhook contained 39syn keyword ratpoisonCommandArg remove resize restart rudeness sdump contained 40syn keyword ratpoisonCommandArg select set setenv sfdump shrink contained 41syn keyword ratpoisonCommandArg source sselect startup_message time title contained 42syn keyword ratpoisonCommandArg tmpwm unalias undefinekey undo unmanage contained 43syn keyword ratpoisonCommandArg unsetenv verbexec version vsplit warp contained 44syn keyword ratpoisonCommandArg windows contained 45 46syn match ratpoisonGravityArg "\<\(n\|north\)\>" contained 47syn match ratpoisonGravityArg "\<\(nw\|northwest\)\>" contained 48syn match ratpoisonGravityArg "\<\(ne\|northeast\)\>" contained 49syn match ratpoisonGravityArg "\<\(w\|west\)\>" contained 50syn match ratpoisonGravityArg "\<\(c\|center\)\>" contained 51syn match ratpoisonGravityArg "\<\(e\|east\)\>" contained 52syn match ratpoisonGravityArg "\<\(s\|south\)\>" contained 53syn match ratpoisonGravityArg "\<\(sw\|southwest\)\>" contained 54syn match ratpoisonGravityArg "\<\(se\|southeast\)\>" contained 55syn case match 56 57syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(F[1-9][0-9]\=\|\(\a\|\d\)\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 58 59syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(space\|exclam\|quotedbl\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 60syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(numbersign\|dollar\|percent\|ampersand\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 61syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(apostrophe\|quoteright\|parenleft\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 62syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(parenright\|asterisk\|plus\|comma\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 63syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(minus\|period\|slash\|colon\|semicolon\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 64syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(less\|equal\|greater\|question\|at\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 65syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(bracketleft\|backslash\|bracketright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 66syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciicircum\|underscore\|grave\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 67syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(quoteleft\|braceleft\|bar\|braceright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 68syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciitilde\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 69 70syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(BackSpace\|Tab\|Linefeed\|Clear\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 71syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Return\|Pause\|Scroll_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 72syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Sys_Req\|Escape\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 73 74syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Home\|Left\|Up\|Right\|Down\|Prior\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 75syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Page_Up\|Next\|Page_Down\|End\|Begin\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 76 77syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Select\|Print\|Execute\|Insert\|Undo\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 78syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Redo\|Menu\|Find\|Cancel\|Help\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 79syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Break\|Mode_switch\|script_switch\|Num_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 80 81syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Space\|Tab\|Enter\|F[1234]\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 82syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Home\|Left\|Up\|Right\|Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 83syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Prior\|Page_Up\|Next\|Page_Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 84syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(End\|Begin\|Insert\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 85syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Equal\|Multiply\|Add\|Separator\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 86syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Subtract\|Decimal\|Divide\|\d\)\>" contained nextgroup=ratpoisonCommandArg skipwhite 87 88syn match ratpoisonHookArg "\<\(key\|switchwin\|switchframe\|switchgroup\|quit\|restart\)\>" contained 89 90syn match ratpoisonNumberArg "\<\d\+\>" contained nextgroup=ratpoisonNumberArg skipwhite 91 92syn keyword ratpoisonSetArg barborder contained nextgroup=ratpoisonNumberArg 93syn keyword ratpoisonSetArg bargravity contained nextgroup=ratpoisonGravityArg 94syn keyword ratpoisonSetArg barpadding contained nextgroup=ratpoisonNumberArg 95syn keyword ratpoisonSetArg bgcolor 96syn keyword ratpoisonSetArg border contained nextgroup=ratpoisonNumberArg 97syn keyword ratpoisonSetArg fgcolor 98syn keyword ratpoisonSetArg fwcolor 99syn keyword ratpoisonSetArg bwcolor 100syn keyword ratpoisonSetArg historysize 101syn keyword ratpoisonSetArg historycompaction 102syn keyword ratpoisonSetArg historyexpansion 103syn keyword ratpoisonSetArg topkmap 104syn keyword ratpoisonSetArg barinpadding 105syn keyword ratpoisonSetArg font 106syn keyword ratpoisonSetArg framesels 107syn keyword ratpoisonSetArg inputwidth contained nextgroup=ratpoisonNumberArg 108syn keyword ratpoisonSetArg maxsizegravity contained nextgroup=ratpoisonGravityArg 109syn keyword ratpoisonSetArg padding contained nextgroup=ratpoisonNumberArg 110syn keyword ratpoisonSetArg resizeunit contained nextgroup=ratpoisonNumberArg 111syn keyword ratpoisonSetArg transgravity contained nextgroup=ratpoisonGravityArg 112syn keyword ratpoisonSetArg waitcursor contained nextgroup=ratpoisonNumberArg 113syn keyword ratpoisonSetArg winfmt contained nextgroup=ratpoisonWinFmtArg 114syn keyword ratpoisonSetArg wingravity contained nextgroup=ratpoisonGravityArg 115syn keyword ratpoisonSetArg winliststyle contained nextgroup=ratpoisonWinListArg 116syn keyword ratpoisonSetArg winname contained nextgroup=ratpoisonWinNameArg 117 118syn match ratpoisonWinFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite 119 120syn match ratpoisonWinListArg "\<\(row\|column\)\>" contained 121 122syn match ratpoisonWinNameArg "\<\(name\|title\|class\)\>" contained 123 124syn match ratpoisonDefCommand "^\s*set\s*" nextgroup=ratpoisonSetArg 125syn match ratpoisonDefCommand "^\s*defbarborder\s*" nextgroup=ratpoisonNumberArg 126syn match ratpoisonDefCommand "^\s*defbargravity\s*" nextgroup=ratpoisonGravityArg 127syn match ratpoisonDefCommand "^\s*defbarpadding\s*" nextgroup=ratpoisonNumberArg 128syn match ratpoisonDefCommand "^\s*defbgcolor\s*" 129syn match ratpoisonDefCommand "^\s*defborder\s*" nextgroup=ratpoisonNumberArg 130syn match ratpoisonDefCommand "^\s*deffgcolor\s*" 131syn match ratpoisonDefCommand "^\s*deffont\s*" 132syn match ratpoisonDefCommand "^\s*defframesels\s*" 133syn match ratpoisonDefCommand "^\s*definputwidth\s*" nextgroup=ratpoisonNumberArg 134syn match ratpoisonDefCommand "^\s*defmaxsizegravity\s*" nextgroup=ratpoisonGravityArg 135syn match ratpoisonDefCommand "^\s*defpadding\s*" nextgroup=ratpoisonNumberArg 136syn match ratpoisonDefCommand "^\s*defresizeunit\s*" nextgroup=ratpoisonNumberArg 137syn match ratpoisonDefCommand "^\s*deftransgravity\s*" nextgroup=ratpoisonGravityArg 138syn match ratpoisonDefCommand "^\s*defwaitcursor\s*" nextgroup=ratpoisonNumberArg 139syn match ratpoisonDefCommand "^\s*defwinfmt\s*" nextgroup=ratpoisonWinFmtArg 140syn match ratpoisonDefCommand "^\s*defwingravity\s*" nextgroup=ratpoisonGravityArg 141syn match ratpoisonDefCommand "^\s*defwinliststyle\s*" nextgroup=ratpoisonWinListArg 142syn match ratpoisonDefCommand "^\s*defwinname\s*" nextgroup=ratpoisonWinNameArg 143syn match ratpoisonDefCommand "^\s*msgwait\s*" nextgroup=ratpoisonNumberArg 144 145syn match ratpoisonStringCommand "^\s*\zsaddhook\ze\s*" nextgroup=ratpoisonHookArg 146syn match ratpoisonStringCommand "^\s*\zsalias\ze\s*" 147syn match ratpoisonStringCommand "^\s*\zsbind\ze\s*" nextgroup=ratpoisonKeySeqArg 148syn match ratpoisonStringCommand "^\s*\zschdir\ze\s*" 149syn match ratpoisonStringCommand "^\s*\zscolon\ze\s*" nextgroup=ratpoisonCommandArg 150syn match ratpoisonStringCommand "^\s*\zsdedicate\ze\s*" nextgroup=ratpoisonNumberArg 151syn match ratpoisonStringCommand "^\s*\zsdefinekey\ze\s*" 152syn match ratpoisonStringCommand "^\s*\zsdelkmap\ze\s*" 153syn match ratpoisonStringCommand "^\s*\zsdescribekey\ze\s*" 154syn match ratpoisonStringCommand "^\s*\zsecho\ze\s*" 155syn match ratpoisonStringCommand "^\s*\zsescape\ze\s*" nextgroup=ratpoisonKeySeqArg 156syn match ratpoisonStringCommand "^\s*\zsexec\ze\s*" 157syn match ratpoisonStringCommand "^\s*\zsfdump\ze\s*" 158syn match ratpoisonStringCommand "^\s*\zsfrestore\ze\s*" 159syn match ratpoisonStringCommand "^\s*\zsgdelete\ze\s*" 160syn match ratpoisonStringCommand "^\s*\zsgetenv\ze\s*" 161syn match ratpoisonStringCommand "^\s*\zsgravity\ze\s*" nextgroup=ratpoisonGravityArg 162syn match ratpoisonStringCommand "^\s*\zsgselect\ze\s*" 163syn match ratpoisonStringCommand "^\s*\zslink\ze\s*" nextgroup=ratpoisonKeySeqArg 164syn match ratpoisonStringCommand "^\s*\zslisthook\ze\s*" nextgroup=ratpoisonHookArg 165syn match ratpoisonStringCommand "^\s*\zsnewkmap\ze\s*" 166syn match ratpoisonStringCommand "^\s*\zsnewwm\ze\s*" 167syn match ratpoisonStringCommand "^\s*\zsnumber\ze\s*" nextgroup=ratpoisonNumberArg 168syn match ratpoisonStringCommand "^\s*\zsprompt\ze\s*" 169syn match ratpoisonStringCommand "^\s*\zsratwarp\ze\s*" 170syn match ratpoisonStringCommand "^\s*\zsratrelwarp\ze\s*" 171syn match ratpoisonStringCommand "^\s*\zsratclick\ze\s*" 172syn match ratpoisonStringCommand "^\s*\zsrathold\ze\s*" 173syn match ratpoisonStringCommand "^\s*\zsreadkey\ze\s*" 174syn match ratpoisonStringCommand "^\s*\zsremhook\ze\s*" nextgroup=ratpoisonHookArg 175syn match ratpoisonStringCommand "^\s*\zsresize\ze\s*" nextgroup=ratpoisonNumberArg 176syn match ratpoisonStringCommand "^\s*\zsrudeness\ze\s*" nextgroup=ratpoisonNumberArg 177syn match ratpoisonStringCommand "^\s*\zsselect\ze\s*" nextgroup=ratpoisonNumberArg 178syn match ratpoisonStringCommand "^\s*\zssetenv\ze\s*" 179syn match ratpoisonStringCommand "^\s*\zssource\ze\s*" 180syn match ratpoisonStringCommand "^\s*\zssselect\ze\s*" 181syn match ratpoisonStringCommand "^\s*\zsstartup_message\ze\s*" nextgroup=ratpoisonBooleanArg 182syn match ratpoisonStringCommand "^\s*\zstitle\ze\s*" 183syn match ratpoisonStringCommand "^\s*\zstmpwm\ze\s*" 184syn match ratpoisonStringCommand "^\s*\zsunalias\ze\s*" 185syn match ratpoisonStringCommand "^\s*\zsunbind\ze\s*" nextgroup=ratpoisonKeySeqArg 186syn match ratpoisonStringCommand "^\s*\zsundefinekey\ze\s*" 187syn match ratpoisonStringCommand "^\s*\zsunmanage\ze\s*" 188syn match ratpoisonStringCommand "^\s*\zsunsetenv\ze\s*" 189syn match ratpoisonStringCommand "^\s*\zsverbexec\ze\s*" 190syn match ratpoisonStringCommand "^\s*\zswarp\ze\s*" nextgroup=ratpoisonBooleanArg 191 192syn match ratpoisonVoidCommand "^\s*\zsabort\ze\s*$" 193syn match ratpoisonVoidCommand "^\s*\zsbanish\ze\s*$" 194syn match ratpoisonVoidCommand "^\s*\zsclrunmanaged\ze\s*$" 195syn match ratpoisonVoidCommand "^\s*\zscnext\ze\s*$" 196syn match ratpoisonVoidCommand "^\s*\zscompat\ze\s*$" 197syn match ratpoisonVoidCommand "^\s*\zscother\ze\s*$" 198syn match ratpoisonVoidCommand "^\s*\zscprev\ze\s*$" 199syn match ratpoisonVoidCommand "^\s*\zscurframe\ze\s*$" 200syn match ratpoisonVoidCommand "^\s*\zsdelete\ze\s*$" 201syn match ratpoisonVoidCommand "^\s*\zsfocusdown\ze\s*$" 202syn match ratpoisonVoidCommand "^\s*\zsfocuslast\ze\s*$" 203syn match ratpoisonVoidCommand "^\s*\zsfocusleft\ze\s*$" 204syn match ratpoisonVoidCommand "^\s*\zsfocusprev\ze\s*$" 205syn match ratpoisonVoidCommand "^\s*\zsfocusright\ze\s*$" 206syn match ratpoisonVoidCommand "^\s*\zsfocusup\ze\s*$" 207syn match ratpoisonVoidCommand "^\s*\zsfocus\ze\s*$" 208syn match ratpoisonVoidCommand "^\s*\zsfselect\ze\s*$" 209syn match ratpoisonVoidCommand "^\s*\zsgetsel\ze\s*$" 210syn match ratpoisonVoidCommand "^\s*\zsgmerge\ze\s*$" 211syn match ratpoisonVoidCommand "^\s*\zsgmove\ze\s*$" 212syn match ratpoisonVoidCommand "^\s*\zsgnewbg\ze\s*$" 213syn match ratpoisonVoidCommand "^\s*\zsgnew\ze\s*$" 214syn match ratpoisonVoidCommand "^\s*\zsgnext\ze\s*$" 215syn match ratpoisonVoidCommand "^\s*\zsgprev\ze\s*$" 216syn match ratpoisonVoidCommand "^\s*\zsgroups\ze\s*$" 217syn match ratpoisonVoidCommand "^\s*\zshelp\ze\s*$" 218syn match ratpoisonVoidCommand "^\s*\zshsplit\ze\s*$" 219syn match ratpoisonVoidCommand "^\s*\zsinext\ze\s*$" 220syn match ratpoisonVoidCommand "^\s*\zsinfo\ze\s*$" 221syn match ratpoisonVoidCommand "^\s*\zsiother\ze\s*$" 222syn match ratpoisonVoidCommand "^\s*\zsiprev\ze\s*$" 223syn match ratpoisonVoidCommand "^\s*\zskill\ze\s*$" 224syn match ratpoisonVoidCommand "^\s*\zslastmsg\ze\s*$" 225syn match ratpoisonVoidCommand "^\s*\zslicense\ze\s*$" 226syn match ratpoisonVoidCommand "^\s*\zsmeta\ze\s*$" 227syn match ratpoisonVoidCommand "^\s*\zsnextscreen\ze\s*$" 228syn match ratpoisonVoidCommand "^\s*\zsnext\ze\s*$" 229syn match ratpoisonVoidCommand "^\s*\zsonly\ze\s*$" 230syn match ratpoisonVoidCommand "^\s*\zsother\ze\s*$" 231syn match ratpoisonVoidCommand "^\s*\zsprevscreen\ze\s*$" 232syn match ratpoisonVoidCommand "^\s*\zsprev\ze\s*$" 233syn match ratpoisonVoidCommand "^\s*\zsputsel\ze\s*$" 234syn match ratpoisonVoidCommand "^\s*\zsquit\ze\s*$" 235syn match ratpoisonVoidCommand "^\s*\zsredisplay\ze\s*$" 236syn match ratpoisonVoidCommand "^\s*\zsredo\ze\s*$" 237syn match ratpoisonVoidCommand "^\s*\zsremove\ze\s*$" 238syn match ratpoisonVoidCommand "^\s*\zsrestart\ze\s*$" 239syn match ratpoisonVoidCommand "^\s*\zssdump\ze\s*$" 240syn match ratpoisonVoidCommand "^\s*\zssfdump\ze\s*$" 241syn match ratpoisonVoidCommand "^\s*\zsshrink\ze\s*$" 242syn match ratpoisonVoidCommand "^\s*\zssplit\ze\s*$" 243syn match ratpoisonVoidCommand "^\s*\zstime\ze\s*$" 244syn match ratpoisonVoidCommand "^\s*\zsundo\ze\s*$" 245syn match ratpoisonVoidCommand "^\s*\zsversion\ze\s*$" 246syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$" 247syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$" 248 249" Define the default highlighting. 250" For version 5.7 and earlier: only when not done already 251" For version 5.8 and later: only when an item doesn't have highlighting yet 252if version >= 508 || !exists("did_ratpoison_syn_inits") 253 if version < 508 254 let did_ratpoison_syn_inits = 1 255 command -nargs=+ HiLink hi link <args> 256 else 257 command -nargs=+ HiLink hi def link <args> 258 endif 259 260 HiLink ratpoisonBooleanArg Boolean 261 HiLink ratpoisonCommandArg Keyword 262 HiLink ratpoisonComment Comment 263 HiLink ratpoisonDefCommand Identifier 264 HiLink ratpoisonGravityArg Constant 265 HiLink ratpoisonKeySeqArg Special 266 HiLink ratpoisonNumberArg Number 267 HiLink ratpoisonSetArg Keyword 268 HiLink ratpoisonStringCommand Identifier 269 HiLink ratpoisonTodo Todo 270 HiLink ratpoisonVoidCommand Identifier 271 HiLink ratpoisonWinFmtArg Special 272 HiLink ratpoisonWinNameArg Constant 273 HiLink ratpoisonWinListArg Constant 274 275 delcommand HiLink 276endif 277 278let b:current_syntax = "ratpoison" 279 280" vim: ts=8 281