846
|
1 " Created : Wed 26 Apr 2006 01:20:53 AM CDT
|
1624
|
2 " Modified : Mon 27 Aug 2007 12:10:37 PM PDT
|
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
|
1624
|
34 \ scrollTtyKeypress transparentForce
|
|
35 \ transparentScrollbar transparentMenubar
|
|
36 \ transparentTabbar tabUsePixmap utmpInhibit
|
|
37 \ visualBell mapAlert meta8
|
|
38 \ mouseWheelScrollPage multibyte_cursor
|
1125
|
39 \ tripleclickwords showMenu xft xftNomFont
|
|
40 \ xftSlowOutput xftAntialias xftHinting
|
|
41 \ xftAutoHint xftGlobalAdvance cmdAllTabs
|
|
42 \ protectSecondary thai borderLess
|
1624
|
43 \ overrideRedirect broadcast smartResize
|
|
44 \ pointerBlank cursorBlink noSysConfig
|
|
45 \ disableMacros linuxHomeEndKey sessionMgt
|
|
46 \ boldColors smoothResize useFifo veryBright
|
1125
|
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
|
1624
|
77 \ fading opacity opacityDegree xftPSize
|
1125
|
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]+)>'
|
846
|
82
|
1125
|
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
|
|
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.*'
|
846
|
97
|
1125
|
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
|
1624
|
105 \ winTitleFormat
|
1125
|
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
|
846
|
130 \ none top bottom left right topleft topright
|
|
131 \ botleft botright
|
|
132
|
1125
|
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
|
846
|
139
|
1125
|
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
|
846
|
146
|
1125
|
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
|
|
153
|
|
154 " xftWidth
|
|
155 syn match mrxvtrcOptions contained skipwhite
|
|
156 \ nextgroup=mrxvtrcXftWd,mrxvtrcError
|
|
157 \ '\v<xftWidth:'
|
|
158 syn keyword mrxvtrcXftWd contained skipwhite nextgroup=mrxvtrcError
|
846
|
159 \ ultracondensed ultraexpanded
|
|
160 \ condensed expanded normal
|
|
161
|
1125
|
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
|
846
|
168
|
1125
|
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
|
846
|
175
|
1125
|
176 " modifier
|
|
177 syn match mrxvtrcOptions contained skipwhite
|
|
178 \ nextgroup=mrxvtrcMod,mrxvtrcError
|
|
179 \ '\v<modifier:'
|
|
180 syn keyword mrxvtrcMod contained skipwhite nextgroup=mrxvtrcError
|
846
|
181 \ alt meta hyper super mod1 mod2 mod3 mod4 mod5
|
|
182
|
1125
|
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
|
846
|
189
|
|
190
|
|
191 "
|
|
192 " Macros
|
|
193 "
|
1125
|
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
|
|
201
|
|
202 " Macros without arguments
|
|
203 syn keyword mrxvtrcMacro contained skipwhite nextgroup=mrxvtrcError
|
|
204 \ Dummy Copy Paste ToggleVeryBold
|
|
205 \ ToggleTransparency ToggleBroadcast
|
|
206 \ ToggleHold SetTitle ToggleMacros
|
1624
|
207 \ ToggleFullscreen Raise
|
1125
|
208
|
|
209 " Macros with a string argument
|
|
210 syn keyword mrxvtrcMacro contained skipwhite nextgroup=mrxvtrcStrVal
|
|
211 \ Esc Str Exec Scroll PrintScreen SaveConfig
|
846
|
212
|
1125
|
213 " Macros with a numeric argument
|
|
214 syn keyword mrxvtrcMacro contained skipwhite
|
|
215 \ nextgroup=mrxvtrcNumVal,mrxvtrcError
|
1624
|
216 \ Close GotoTab MoveTab ResizeFont UseFifo
|
846
|
217
|
1125
|
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]>'
|
846
|
234
|
|
235 "
|
|
236 " Highlighting groups
|
|
237 "
|
1125
|
238 hi def link mrxvtrcError Error
|
846
|
239 hi def link mrxvtrcComment Comment
|
|
240
|
1125
|
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
|
846
|
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
|
1125
|
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
|
846
|
275
|
|
276 let b:current_syntax = "mrxvtrc"
|