846
|
1 " Created : Wed 26 Apr 2006 01:20:53 AM CDT
|
|
2 " Modified : Thu 27 Apr 2006 02:29:25 PM CDT
|
|
3 " Author : Gautam Iyer <gi1242@users.sourceforge.net>
|
|
4 " Description : Syntax file for mrxvtrc
|
|
5
|
|
6 " Quit when a syntax file was already loaded
|
|
7 if exists("b:current_syntax")
|
|
8 finish
|
|
9 endif
|
|
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
|
|
21
|
|
22 syn match mrxvtrcComment contains=@Spell '^\s*!.*$'
|
|
23 syn match mrxvtrcComment '\v^\s*!\s*\w+[.*]\w+.*:.*'
|
|
24
|
|
25 "
|
|
26 " Generic options (string / color / number / boolean)
|
|
27 "
|
|
28 syn match mrxvtrcOptErr '\v^\s*\w+[.*]?.{-}(:|$)'
|
|
29 exec 'syn match mrxvtrcBoolOpts nextgroup=mrxvtrcBoolVal,mrxvtrcValErr'
|
|
30 \ '"\v^\w+[.*]'.s:boolOpts.':\s*"'
|
|
31 exec 'syn match mrxvtrcNumOpts nextgroup=mrxvtrcNumVal,mrxvtrcValErr'
|
|
32 \ '"\v^\w+[.*]'.s:numOpts.':\s*"'
|
|
33 exec 'syn match mrxvtrcColorOpts nextgroup=mrxvtrcColorVal'
|
|
34 \ '"\v^\w+[.*]'.s:colorOpts.':\s*"'
|
|
35 exec 'syn match mrxvtrcStrOpts nextgroup=mrxvtrcStrVal,mrxvtrcValErr'
|
|
36 \ '"\v^\w+[.*]'.s:strOpts.':\s*"'
|
|
37
|
|
38 syn case ignore
|
|
39
|
|
40 syn match mrxvtrcValErr contained '\v.+$'
|
|
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
|
|
47
|
|
48 "
|
|
49 " Options with special values
|
|
50 "
|
|
51 syn match mrxvtrcOptions nextgroup=mrxvtrcSBstyle,mrxvtrcValErr
|
|
52 \ '\v^\w+[.*]scrollbarStyle:\s*'
|
|
53 syn keyword mrxvtrcSBstyle contained plain xterm rxvt next sgi
|
|
54
|
|
55 syn match mrxvtrcOptions nextgroup=mrxvtrcSBalign,mrxvtrcValErr
|
|
56 \ '\v^\w+[.*]scrollbarAlign:\s*'
|
|
57 syn keyword mrxvtrcSBalign contained top bottom
|
|
58
|
|
59 syn match mrxvtrcOptions nextgroup=mrxvtrcTSmode,mrxvtrcValErr
|
|
60 \ '\v^\w+[.*]textShadowMode:\s*'
|
|
61 syn keyword mrxvtrcTSmode contained
|
|
62 \ none top bottom left right topleft topright
|
|
63 \ botleft botright
|
|
64
|
|
65 syn match mrxvtrcOptions nextgroup=mrxvtrcGrkKbd,mrxvtrcValErr
|
|
66 \ '\v^\w+[.*]greek_keyboard:\s*'
|
|
67 syn keyword mrxvtrcGrkKbd contained iso ibm
|
|
68
|
|
69 syn match mrxvtrcOptions nextgroup=mrxvtrcXftWt,mrxvtrcValErr
|
|
70 \ '\v^\w+[.*]xftWeight:\s*'
|
|
71 syn keyword mrxvtrcXftWt contained light medium bold
|
|
72
|
|
73 syn match mrxvtrcOptions nextgroup=mrxvtrcXftSl,mrxvtrcValErr
|
|
74 \ '\v^\w+[.*]xftSlant:\s*'
|
|
75 syn keyword mrxvtrcXftSl contained roman italic oblique
|
|
76
|
|
77 syn match mrxvtrcOptions nextgroup=mrxvtrcXftWd,mrxvtrcValErr
|
|
78 \ '\v^\w+[.*]xftWidth:\s*'
|
|
79 syn keyword mrxvtrcXftWd contained
|
|
80 \ ultracondensed ultraexpanded
|
|
81 \ condensed expanded normal
|
|
82
|
|
83 syn match mrxvtrcOptions nextgroup=mrxvtrcXftHt,mrxvtrcValErr
|
|
84 \ '\v^\w+[.*]xftRGBA:\s*'
|
|
85 syn keyword mrxvtrcXftHt contained rgb bgr vrgb vbgr none
|
|
86
|
|
87 syn match mrxvtrcOptions nextgroup=mrxvtrcPedit,mrxvtrcValErr
|
|
88 \ '\v^\w+[.*]preeditType:\s*'
|
|
89 syn keyword mrxvtrcPedit contained OverTheSpot OffTheSpot Root
|
|
90
|
|
91 syn match mrxvtrcOptions nextgroup=mrxvtrcMod,mrxvtrcValErr
|
|
92 \ '\v^\w+[.*]modifier:\s*'
|
|
93 syn keyword mrxvtrcMod contained
|
|
94 \ alt meta hyper super mod1 mod2 mod3 mod4 mod5
|
|
95
|
|
96 syn match mrxvtrcOptions nextgroup=mrxvtrcSelSty,mrxvtrcValErr
|
|
97 \ '\v^\w+[.*]selectStyle:\s*'
|
|
98 syn keyword mrxvtrcSelSty contained old oldword
|
|
99
|
|
100
|
|
101 "
|
|
102 " Macros
|
|
103 "
|
|
104 syn match mrxvtrcOptions nextgroup=mrxvtrcMacro,mrxvtrcValErr
|
|
105 \ '\v\c^\w+[.*]macro.(primary\+)?((ctrl|alt|meta|shift)\+)*\w+:\s*'
|
|
106 syn keyword mrxvtrcMacro contained nextgroup=mrxvtrcMacroArg
|
|
107 \ Dummy Esc Str NewTab Close GotoTab MoveTab
|
|
108 \ Scroll Copy Paste ToggleSubwin ResizeFont
|
|
109 \ ToggleVeryBold ToggleTransparency
|
|
110 \ ToggleBroadcast ToggleHold SetTitle
|
|
111 \ PrintScreen SaveConfig ToggleMacros
|
|
112 syn match mrxvtrcMacroArg contained '.\+$'
|
|
113
|
|
114
|
|
115 unlet s:strOpts s:boolOpts s:colorOpts s:numOpts
|
|
116
|
|
117 "
|
|
118 " Highlighting groups
|
|
119 "
|
|
120 hi def link mrxvtrcComment Comment
|
|
121
|
|
122 hi def link mrxvtrcBoolOpts Statement
|
|
123 hi def link mrxvtrcColorOpts mrxvtrcBoolOpts
|
|
124 hi def link mrxvtrcNumOpts mrxvtrcBoolOpts
|
|
125 hi def link mrxvtrcStrOpts mrxvtrcBoolOpts
|
|
126 hi def link mrxvtrcOptions mrxvtrcBoolOpts
|
|
127
|
|
128 hi def link mrxvtrcBoolVal Boolean
|
|
129 hi def link mrxvtrcStrVal String
|
|
130 hi def link mrxvtrcColorVal Constant
|
|
131 hi def link mrxvtrcNumVal Number
|
|
132
|
|
133 hi def link mrxvtrcSBstyle mrxvtrcStrVal
|
|
134 hi def link mrxvtrcSBalign mrxvtrcStrVal
|
|
135 hi def link mrxvtrcTSmode mrxvtrcStrVal
|
|
136 hi def link mrxvtrcGrkKbd mrxvtrcStrVal
|
|
137 hi def link mrxvtrcXftWt mrxvtrcStrVal
|
|
138 hi def link mrxvtrcXftSl mrxvtrcStrVal
|
|
139 hi def link mrxvtrcXftWd mrxvtrcStrVal
|
|
140 hi def link mrxvtrcXftHt mrxvtrcStrVal
|
|
141 hi def link mrxvtrcPedit mrxvtrcStrVal
|
|
142 hi def link mrxvtrcMod mrxvtrcStrVal
|
|
143 hi def link mrxvtrcSelSty mrxvtrcStrVal
|
|
144
|
|
145 hi def link mrxvtrcMacro Identifier
|
|
146 hi def link mrxvtrcMacroArg String
|
|
147
|
|
148 hi def link mrxvtrcOptErr Error
|
|
149 hi def link mrxvtrcValErr Error
|
|
150
|
|
151 let b:current_syntax = "mrxvtrc"
|