846
|
1 " Created : Wed 26 Apr 2006 01:20:53 AM CDT
|
1125
|
2 " Modified : Mon 20 Nov 2006 12:14:16 AM PST
|
846
|
3 " Author : Gautam Iyer <gi1242@users.sourceforge.net>
|
1125
|
4 " Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up)
|
846
|
5
|
|
6 " Quit when a syntax file was already loaded
|
|
7 if exists("b:current_syntax")
|
|
8 finish
|
|
9 endif
|
|
10
|
|
11 syn case match
|
|
12
|
1125
|
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+.*:.*'
|
846
|
19
|
|
20 "
|
1125
|
21 " Options.
|
846
|
22 "
|
1125
|
23 syn match mrxvtrcClass '\v^\s*\w+[.*]'
|
|
24 \ nextgroup=mrxvtrcOptions,mrxvtrcProfile,@mrxvtrcPOpts,mrxvtrcError
|
846
|
25
|
1125
|
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
|
|
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 ':'
|
846
|
51 syn case ignore
|
1125
|
52 syn keyword mrxvtrcBoolVal contained skipwhite nextgroup=mrxvtrcError
|
|
53 \ 0 1 yes no on off true false
|
846
|
54 syn case match
|
|
55
|
1125
|
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}'
|
|
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]+)>'
|
846
|
83
|
1125
|
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.*'
|
846
|
99
|
1125
|
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
|
846
|
131 \ none top bottom left right topleft topright
|
|
132 \ botleft botright
|
|
133
|
1125
|
134 " greek_keyboard
|
|
135 syn match mrxvtrcOptions contained skipwhite
|
|
136 \ nextgroup=mrxvtrcGrkKbd,mrxvtrcError
|
|
137 \ '\v<greek_keyboard:'
|
|
138 syn keyword mrxvtrcGrkKbd contained skipwhite nextgroup=mrxvtrcError
|
|
139 \ iso ibm
|
846
|
140
|
1125
|
141 " xftWeight
|
|
142 syn match mrxvtrcOptions contained skipwhite
|
|
143 \ nextgroup=mrxvtrcXftWt,mrxvtrcError
|
|
144 \ '\v<(xftWeight|xftBoldWeight):'
|
|
145 syn keyword mrxvtrcXftWt contained skipwhite nextgroup=mrxvtrcError
|
|
146 \ light medium demibold bold black
|
846
|
147
|
1125
|
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
|
846
|
160 \ ultracondensed ultraexpanded
|
|
161 \ condensed expanded normal
|
|
162
|
1125
|
163 " xftRGBA
|
|
164 syn match mrxvtrcOptions contained skipwhite
|
|
165 \ nextgroup=mrxvtrcXftHt,mrxvtrcError
|
|
166 \ '\v<xftRGBA:'
|
|
167 syn keyword mrxvtrcXftHt contained skipwhite nextgroup=mrxvtrcError
|
|
168 \ rgb bgr vrgb vbgr none
|
846
|
169
|
1125
|
170 " preeditType
|
|
171 syn match mrxvtrcOptions contained skipwhite
|
|
172 \ nextgroup=mrxvtrcPedit,mrxvtrcError
|
|
173 \ '\v<preeditType:'
|
|
174 syn keyword mrxvtrcPedit contained skipwhite nextgroup=mrxvtrcError
|
|
175 \ OverTheSpot OffTheSpot Root
|
846
|
176
|
1125
|
177 " modifier
|
|
178 syn match mrxvtrcOptions contained skipwhite
|
|
179 \ nextgroup=mrxvtrcMod,mrxvtrcError
|
|
180 \ '\v<modifier:'
|
|
181 syn keyword mrxvtrcMod contained skipwhite nextgroup=mrxvtrcError
|
846
|
182 \ alt meta hyper super mod1 mod2 mod3 mod4 mod5
|
|
183
|
1125
|
184 " selectStyle
|
|
185 syn match mrxvtrcOptions contained skipwhite
|
|
186 \ nextgroup=mrxvtrcSelSty,mrxvtrcError
|
|
187 \ '\v<selectStyle:'
|
|
188 syn keyword mrxvtrcSelSty contained skipwhite nextgroup=mrxvtrcError
|
|
189 \ old oldword
|
846
|
190
|
|
191
|
|
192 "
|
|
193 " Macros
|
|
194 "
|
1125
|
195 syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcKey,mrxvtrcError
|
|
196 \ macro
|
|
197 syn case ignore
|
|
198 syn match mrxvtrcKey contained skipwhite
|
|
199 \ nextgroup=mrxvtrcMacro,mrxvtrcError
|
|
200 \ '\v\.((primary|add|ctrl|alt|meta|shift)\+)*\w+:'
|
|
201 syn case match
|
|
202
|
|
203 " Macros without arguments
|
|
204 syn keyword mrxvtrcMacro contained skipwhite nextgroup=mrxvtrcError
|
|
205 \ Dummy Copy Paste ToggleVeryBold
|
|
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
|
846
|
213
|
1125
|
214 " Macros with a numeric argument
|
|
215 syn keyword mrxvtrcMacro contained skipwhite
|
|
216 \ nextgroup=mrxvtrcNumVal,mrxvtrcError
|
|
217 \ Close GotoTab MoveTab ResizeFont
|
846
|
218
|
1125
|
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]>'
|
846
|
235
|
|
236 "
|
|
237 " Highlighting groups
|
|
238 "
|
1125
|
239 hi def link mrxvtrcError Error
|
846
|
240 hi def link mrxvtrcComment Comment
|
|
241
|
1125
|
242 hi def link mrxvtrcClass Statement
|
|
243 hi def link mrxvtrcOptions mrxvtrcClass
|
|
244 hi def link mrxvtrcBColon mrxvtrcClass
|
|
245 hi def link mrxvtrcCColon mrxvtrcClass
|
|
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
|
846
|
252
|
|
253 hi def link mrxvtrcBoolVal Boolean
|
|
254 hi def link mrxvtrcStrVal String
|
|
255 hi def link mrxvtrcColorVal Constant
|
|
256 hi def link mrxvtrcNumVal Number
|
|
257
|
|
258 hi def link mrxvtrcSBstyle mrxvtrcStrVal
|
|
259 hi def link mrxvtrcSBalign mrxvtrcStrVal
|
|
260 hi def link mrxvtrcTSmode mrxvtrcStrVal
|
|
261 hi def link mrxvtrcGrkKbd mrxvtrcStrVal
|
|
262 hi def link mrxvtrcXftWt mrxvtrcStrVal
|
|
263 hi def link mrxvtrcXftSl mrxvtrcStrVal
|
|
264 hi def link mrxvtrcXftWd mrxvtrcStrVal
|
|
265 hi def link mrxvtrcXftHt mrxvtrcStrVal
|
|
266 hi def link mrxvtrcPedit mrxvtrcStrVal
|
|
267 hi def link mrxvtrcMod mrxvtrcStrVal
|
|
268 hi def link mrxvtrcSelSty mrxvtrcStrVal
|
|
269
|
|
270 hi def link mrxvtrcMacro Identifier
|
1125
|
271 hi def link mrxvtrcKey mrxvtrcClass
|
|
272 hi def link mrxvtrcTitle mrxvtrcStrVal
|
|
273 hi def link mrxvtrcShell Special
|
|
274 hi def link mrxvtrcCmd PreProc
|
|
275 hi def link mrxvtrcSubwin mrxvtrcStrVal
|
846
|
276
|
|
277 let b:current_syntax = "mrxvtrc"
|