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