Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 1 | " Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up) |
Bram Moolenaar | b8ff1fb | 2012-02-04 21:59:01 +0100 | [diff] [blame] | 2 | " Created : Wed 26 Apr 2006 01:20:53 AM CDT |
| 3 | " Modified : Thu 02 Feb 2012 08:37:45 PM EST |
| 4 | " Maintainer : GI <a@b.c>, where a='gi1242+vim', b='gmail', c='com' |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 5 | |
| 6 | " Quit when a syntax file was already loaded |
| 7 | if exists("b:current_syntax") |
| 8 | finish |
| 9 | endif |
| 10 | |
Bram Moolenaar | b8ff1fb | 2012-02-04 21:59:01 +0100 | [diff] [blame] | 11 | let s:cpo_save = &cpo |
| 12 | set cpo&vim |
| 13 | |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 14 | syn case match |
| 15 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 16 | " Errors |
| 17 | syn match mrxvtrcError contained '\v\S+' |
| 18 | |
| 19 | " Comments |
| 20 | syn match mrxvtrcComment contains=@Spell '^\s*[!#].*$' |
| 21 | syn match mrxvtrcComment '\v^\s*[#!]\s*\w+[.*]\w+.*:.*' |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 22 | |
| 23 | " |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 24 | " Options. |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 25 | " |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 26 | syn match mrxvtrcClass '\v^\s*\w+[.*]' |
| 27 | \ nextgroup=mrxvtrcOptions,mrxvtrcProfile,@mrxvtrcPOpts,mrxvtrcError |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 28 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 29 | " Boolean options |
| 30 | syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError |
| 31 | \ highlightTabOnBell syncTabTitle hideTabbar |
| 32 | \ autohideTabbar bottomTabbar hideButtons |
| 33 | \ syncTabIcon veryBoldFont maximized |
| 34 | \ fullscreen reverseVideo loginShell |
| 35 | \ jumpScroll scrollBar scrollbarRight |
| 36 | \ scrollbarFloating scrollTtyOutputInhibit |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 37 | \ scrollTtyKeypress transparentForce |
| 38 | \ transparentScrollbar transparentMenubar |
| 39 | \ transparentTabbar tabUsePixmap utmpInhibit |
| 40 | \ visualBell mapAlert meta8 |
| 41 | \ mouseWheelScrollPage multibyte_cursor |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 42 | \ tripleclickwords showMenu xft xftNomFont |
| 43 | \ xftSlowOutput xftAntialias xftHinting |
| 44 | \ xftAutoHint xftGlobalAdvance cmdAllTabs |
| 45 | \ protectSecondary thai borderLess |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 46 | \ overrideRedirect broadcast smartResize |
| 47 | \ pointerBlank cursorBlink noSysConfig |
| 48 | \ disableMacros linuxHomeEndKey sessionMgt |
| 49 | \ boldColors smoothResize useFifo veryBright |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 50 | syn match mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError |
| 51 | \ '\v<transparent>' |
| 52 | syn match mrxvtrcBColon contained skipwhite |
| 53 | \ nextgroup=mrxvtrcBoolVal,mrxvtrcError ':' |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 54 | syn case ignore |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 55 | syn keyword mrxvtrcBoolVal contained skipwhite nextgroup=mrxvtrcError |
| 56 | \ 0 1 yes no on off true false |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 57 | syn case match |
| 58 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 59 | " Color options |
| 60 | syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError |
| 61 | \ ufBackground textShadow tabForeground |
| 62 | \ itabForeground tabBackground itabBackground |
| 63 | \ scrollColor troughColor highlightColor |
| 64 | \ cursorColor cursorColor2 pointerColor |
| 65 | \ borderColor tintColor |
| 66 | syn match mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError |
| 67 | \ '\v<color([0-9]|1[0-5]|BD|UL|RV)>' |
| 68 | syn match mrxvtrcCColon contained skipwhite |
| 69 | \ nextgroup=mrxvtrcColorVal ':' |
| 70 | syn match mrxvtrcColorVal contained skipwhite nextgroup=mrxvtrcError |
| 71 | \ '\v#[0-9a-fA-F]{6}' |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 72 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 73 | " Numeric options |
| 74 | syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcNColon,mrxvtrcError |
| 75 | \ maxTabWidth minVisibleTabs |
| 76 | \ scrollbarThickness xftmSize xftSize desktop |
| 77 | \ externalBorder internalBorder lineSpace |
| 78 | \ pointerBlankDelay cursorBlinkInterval |
| 79 | \ shading backgroundFade bgRefreshInterval |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 80 | \ fading opacity opacityDegree xftPSize |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 81 | syn match mrxvtrcNColon contained skipwhite |
| 82 | \ nextgroup=mrxvtrcNumVal,mrxvtrcError ':' |
| 83 | syn match mrxvtrcNumVal contained skipwhite nextgroup=mrxvtrcError |
| 84 | \ '\v[+-]?<(0[0-7]+|\d+|0x[0-9a-f]+)>' |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 85 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 86 | " String options |
| 87 | syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError |
| 88 | \ tabTitle termName title clientName iconName |
| 89 | \ bellCommand backspaceKey deleteKey |
| 90 | \ printPipe cutChars answerbackString |
| 91 | \ smClientID geometry path boldFont xftFont |
| 92 | \ xftmFont xftPFont inputMethod |
| 93 | \ greektoggle_key menu menubarPixmap |
| 94 | \ scrollbarPixmap tabbarPixmap appIcon |
| 95 | \ multichar_encoding initProfileList |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 96 | syn match mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError |
| 97 | \ '\v<m?font[1-5]?>' |
| 98 | syn match mrxvtrcSColon contained skipwhite nextgroup=mrxvtrcStrVal ':' |
| 99 | syn match mrxvtrcStrVal contained '\v\S.*' |
| 100 | |
| 101 | " Profile options |
| 102 | syn cluster mrxvtrcPOpts contains=mrxvtrcPSOpts,mrxvtrcPCOpts,mrxvtrcPNOpts |
| 103 | syn match mrxvtrcProfile contained nextgroup=@mrxvtrcPOpts,mrxvtrcError |
| 104 | \ '\vprofile\d+\.' |
| 105 | syn keyword mrxvtrcPSOpts contained nextgroup=mrxvtrcSColon,mrxvtrcError |
| 106 | \ tabTitle command holdExitText holdExitTitle |
| 107 | \ Pixmap workingDirectory titleFormat |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 108 | \ winTitleFormat |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 109 | syn keyword mrxvtrcPCOpts contained nextgroup=mrxvtrcCColon,mrxvtrcError |
| 110 | \ background foreground |
| 111 | syn keyword mrxvtrcPNOpts contained nextgroup=mrxvtrcNColon,mrxvtrcError |
| 112 | \ holdExit saveLines |
| 113 | |
| 114 | " scrollbarStyle |
| 115 | syn match mrxvtrcOptions contained skipwhite |
| 116 | \ nextgroup=mrxvtrcSBstyle,mrxvtrcError |
| 117 | \ '\v<scrollbarStyle:' |
| 118 | syn keyword mrxvtrcSBstyle contained skipwhite nextgroup=mrxvtrcError |
| 119 | \ plain xterm rxvt next sgi |
| 120 | |
| 121 | " scrollbarAlign |
| 122 | syn match mrxvtrcOptions contained skipwhite |
| 123 | \ nextgroup=mrxvtrcSBalign,mrxvtrcError |
| 124 | \ '\v<scrollbarAlign:' |
| 125 | syn keyword mrxvtrcSBalign contained skipwhite nextgroup=mrxvtrcError |
| 126 | \ top bottom |
| 127 | |
| 128 | " textShadowMode |
| 129 | syn match mrxvtrcOptions contained skipwhite |
| 130 | \ nextgroup=mrxvtrcTSmode,mrxvtrcError |
| 131 | \ '\v<textShadowMode:' |
| 132 | syn keyword mrxvtrcTSmode contained skipwhite nextgroup=mrxvtrcError |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 133 | \ none top bottom left right topleft topright |
| 134 | \ botleft botright |
| 135 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 136 | " greek_keyboard |
| 137 | syn match mrxvtrcOptions contained skipwhite |
| 138 | \ nextgroup=mrxvtrcGrkKbd,mrxvtrcError |
| 139 | \ '\v<greek_keyboard:' |
| 140 | syn keyword mrxvtrcGrkKbd contained skipwhite nextgroup=mrxvtrcError |
| 141 | \ iso ibm |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 142 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 143 | " xftWeight |
| 144 | syn match mrxvtrcOptions contained skipwhite |
| 145 | \ nextgroup=mrxvtrcXftWt,mrxvtrcError |
| 146 | \ '\v<(xftWeight|xftBoldWeight):' |
| 147 | syn keyword mrxvtrcXftWt contained skipwhite nextgroup=mrxvtrcError |
| 148 | \ light medium demibold bold black |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 149 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 150 | " xftSlant |
| 151 | syn match mrxvtrcOptions contained skipwhite |
| 152 | \ nextgroup=mrxvtrcXftSl,mrxvtrcError |
| 153 | \ '\v<xftSlant:' |
| 154 | syn keyword mrxvtrcXftSl contained skipwhite nextgroup=mrxvtrcError |
| 155 | \ roman italic oblique |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 156 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 157 | " xftWidth |
| 158 | syn match mrxvtrcOptions contained skipwhite |
| 159 | \ nextgroup=mrxvtrcXftWd,mrxvtrcError |
| 160 | \ '\v<xftWidth:' |
| 161 | syn keyword mrxvtrcXftWd contained skipwhite nextgroup=mrxvtrcError |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 162 | \ ultracondensed ultraexpanded |
| 163 | \ condensed expanded normal |
| 164 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 165 | " xftRGBA |
| 166 | syn match mrxvtrcOptions contained skipwhite |
| 167 | \ nextgroup=mrxvtrcXftHt,mrxvtrcError |
| 168 | \ '\v<xftRGBA:' |
| 169 | syn keyword mrxvtrcXftHt contained skipwhite nextgroup=mrxvtrcError |
| 170 | \ rgb bgr vrgb vbgr none |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 171 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 172 | " preeditType |
| 173 | syn match mrxvtrcOptions contained skipwhite |
| 174 | \ nextgroup=mrxvtrcPedit,mrxvtrcError |
| 175 | \ '\v<preeditType:' |
| 176 | syn keyword mrxvtrcPedit contained skipwhite nextgroup=mrxvtrcError |
| 177 | \ OverTheSpot OffTheSpot Root |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 178 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 179 | " modifier |
| 180 | syn match mrxvtrcOptions contained skipwhite |
| 181 | \ nextgroup=mrxvtrcMod,mrxvtrcError |
| 182 | \ '\v<modifier:' |
| 183 | syn keyword mrxvtrcMod contained skipwhite nextgroup=mrxvtrcError |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 184 | \ alt meta hyper super mod1 mod2 mod3 mod4 mod5 |
| 185 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 186 | " selectStyle |
| 187 | syn match mrxvtrcOptions contained skipwhite |
| 188 | \ nextgroup=mrxvtrcSelSty,mrxvtrcError |
| 189 | \ '\v<selectStyle:' |
| 190 | syn keyword mrxvtrcSelSty contained skipwhite nextgroup=mrxvtrcError |
| 191 | \ old oldword |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 192 | |
| 193 | |
| 194 | " |
| 195 | " Macros |
| 196 | " |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 197 | syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcKey,mrxvtrcError |
| 198 | \ macro |
| 199 | syn case ignore |
| 200 | syn match mrxvtrcKey contained skipwhite |
| 201 | \ nextgroup=mrxvtrcMacro,mrxvtrcError |
| 202 | \ '\v\.((primary|add|ctrl|alt|meta|shift)\+)*\w+:' |
| 203 | syn case match |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 204 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 205 | " Macros without arguments |
| 206 | syn keyword mrxvtrcMacro contained skipwhite nextgroup=mrxvtrcError |
| 207 | \ Dummy Copy Paste ToggleVeryBold |
| 208 | \ ToggleTransparency ToggleBroadcast |
| 209 | \ ToggleHold SetTitle ToggleMacros |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 210 | \ ToggleFullscreen Raise |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 211 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 212 | " Macros with a string argument |
| 213 | syn keyword mrxvtrcMacro contained skipwhite nextgroup=mrxvtrcStrVal |
| 214 | \ Esc Str Exec Scroll PrintScreen SaveConfig |
| 215 | |
| 216 | " Macros with a numeric argument |
| 217 | syn keyword mrxvtrcMacro contained skipwhite |
| 218 | \ nextgroup=mrxvtrcNumVal,mrxvtrcError |
Bram Moolenaar | 8c8de83 | 2008-06-24 22:58:06 +0000 | [diff] [blame] | 219 | \ Close GotoTab MoveTab ResizeFont UseFifo |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 220 | |
| 221 | " NewTab macro |
| 222 | syn keyword mrxvtrcMacro contained skipwhite |
| 223 | \ nextgroup=mrxvtrcTitle,mrxvtrcShell,mrxvtrcCmd |
| 224 | \ NewTab |
| 225 | syn region mrxvtrcTitle contained oneline skipwhite |
| 226 | \ nextgroup=mrxvtrcShell,mrxvtrcCmd |
| 227 | \ start='"' end='"' |
| 228 | syn match mrxvtrcShell contained nextgroup=mrxvtrcCmd '!' |
| 229 | syn match mrxvtrcCmd contained '\v[^!" \t].*' |
| 230 | |
| 231 | " ToggleSubwin macro |
| 232 | syn keyword mrxvtrcMacro contained skipwhite |
| 233 | \ nextgroup=mrxvtrcSubwin,mrxvtrcError |
| 234 | \ ToggleSubwin |
| 235 | syn match mrxvtrcSubwin contained skipwhite nextgroup=mrxvtrcError |
| 236 | \ '\v[-+]?[bmst]>' |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 237 | |
| 238 | " |
| 239 | " Highlighting groups |
| 240 | " |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 241 | hi def link mrxvtrcError Error |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 242 | hi def link mrxvtrcComment Comment |
| 243 | |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 244 | hi def link mrxvtrcClass Statement |
| 245 | hi def link mrxvtrcOptions mrxvtrcClass |
| 246 | hi def link mrxvtrcBColon mrxvtrcClass |
| 247 | hi def link mrxvtrcCColon mrxvtrcClass |
| 248 | hi def link mrxvtrcNColon mrxvtrcClass |
| 249 | hi def link mrxvtrcSColon mrxvtrcClass |
| 250 | hi def link mrxvtrcProfile mrxvtrcClass |
| 251 | hi def link mrxvtrcPSOpts mrxvtrcClass |
| 252 | hi def link mrxvtrcPCOpts mrxvtrcClass |
| 253 | hi def link mrxvtrcPNOpts mrxvtrcClass |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 254 | |
| 255 | hi def link mrxvtrcBoolVal Boolean |
| 256 | hi def link mrxvtrcStrVal String |
| 257 | hi def link mrxvtrcColorVal Constant |
| 258 | hi def link mrxvtrcNumVal Number |
| 259 | |
| 260 | hi def link mrxvtrcSBstyle mrxvtrcStrVal |
| 261 | hi def link mrxvtrcSBalign mrxvtrcStrVal |
| 262 | hi def link mrxvtrcTSmode mrxvtrcStrVal |
| 263 | hi def link mrxvtrcGrkKbd mrxvtrcStrVal |
| 264 | hi def link mrxvtrcXftWt mrxvtrcStrVal |
| 265 | hi def link mrxvtrcXftSl mrxvtrcStrVal |
| 266 | hi def link mrxvtrcXftWd mrxvtrcStrVal |
| 267 | hi def link mrxvtrcXftHt mrxvtrcStrVal |
| 268 | hi def link mrxvtrcPedit mrxvtrcStrVal |
| 269 | hi def link mrxvtrcMod mrxvtrcStrVal |
| 270 | hi def link mrxvtrcSelSty mrxvtrcStrVal |
| 271 | |
| 272 | hi def link mrxvtrcMacro Identifier |
Bram Moolenaar | c81e5e7 | 2007-05-05 18:24:42 +0000 | [diff] [blame] | 273 | hi def link mrxvtrcKey mrxvtrcClass |
| 274 | hi def link mrxvtrcTitle mrxvtrcStrVal |
| 275 | hi def link mrxvtrcShell Special |
| 276 | hi def link mrxvtrcCmd PreProc |
| 277 | hi def link mrxvtrcSubwin mrxvtrcStrVal |
Bram Moolenaar | 437df8f | 2006-04-27 21:47:44 +0000 | [diff] [blame] | 278 | |
| 279 | let b:current_syntax = "mrxvtrc" |
Bram Moolenaar | b8ff1fb | 2012-02-04 21:59:01 +0100 | [diff] [blame] | 280 | |
| 281 | let &cpo = s:cpo_save |
| 282 | unlet s:cpo_save |