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