blob: 43b7abcfc553e40dd04552dde0147c85f3a9b210 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar9964e462007-05-05 17:54:07 +00002" Language: Fvwm{1,2} configuration file
3" Maintainer: Gautam Iyer <gi1242@users.sourceforge.net>
4" Previous Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
5" Last Change: Sat 04 Nov 2006 11:28:37 PM PST
Bram Moolenaar071d4272004-06-13 20:20:40 +00006"
7" Thanks to David Necas (Yeti) for adding Fvwm 2.4 support.
Bram Moolenaar9964e462007-05-05 17:54:07 +00008"
9" 2006-05-09 gi1242: Rewrote fvwm2 syntax completely. Also since fvwm1 is now
10" mostly obsolete, made the syntax file pick fvwm2 syntax by default.
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
Bram Moolenaar9964e462007-05-05 17:54:07 +000012if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000013 finish
14endif
15
16" Fvwm configuration files are case insensitive
17syn case ignore
18
19" Identifiers in Fvwm can contain most characters, so we only
20" include the most common ones here.
Bram Moolenaar9964e462007-05-05 17:54:07 +000021setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57
Bram Moolenaar071d4272004-06-13 20:20:40 +000022
Bram Moolenaar9964e462007-05-05 17:54:07 +000023" Syntax items common to fvwm1 and fvwm2 config files
24syn cluster fvwmConstants contains=fvwmEnvVar,fvwmNumber
Bram Moolenaar071d4272004-06-13 20:20:40 +000025syn match fvwmEnvVar "\$\w\+"
Bram Moolenaar9964e462007-05-05 17:54:07 +000026syn match fvwmNumber '\v<(\d+|0x[0-9a-f]+)>'
27
28syn match fvwmModConf nextgroup=fvwmModArg "\v^\s*\*\a+"
29syn region fvwmModArg contained contains=fvwmString,fvwmRGBValue
30 \ start='.' skip='\\$' end='$'
31
32syn region fvwmString contains=fvwmBackslash start='"'
33 \ matchgroup=fvwmBackslash skip='\v\\"' end='"'
34syn region fvwmString contains=fvwmBackslash start='`'
35 \ matchgroup=fvwmBackslash skip='\v\\`' end='`'
36syn region fvwmString contains=fvwmBackslash start="'"
37 \ matchgroup=fvwmBackslash skip="\v\\'" end="'"
38syn match fvwmBackslash contained '\\[^"'`]'
39
Bram Moolenaar071d4272004-06-13 20:20:40 +000040syn match fvwmRGBValue "#\x\{3}"
41syn match fvwmRGBValue "#\x\{6}"
42syn match fvwmRGBValue "#\x\{9}"
43syn match fvwmRGBValue "#\x\{12}"
44syn match fvwmRGBValue "rgb:\x\{1,4}/\x\{1,4}/\x\{1,4}"
Bram Moolenaar071d4272004-06-13 20:20:40 +000045
Bram Moolenaar9964e462007-05-05 17:54:07 +000046syn region fvwmComment contains=@Spell start="^\s*#" skip='\\$' end='$'
47
48if (exists("b:fvwm_version") && b:fvwm_version == 1)
49 \ || (exists("use_fvwm_1") && use_fvwm_1)
50
51 "
52 " Syntax highlighting for Fvwm1 files.
53 "
54
55 " Moved from common syntax items
56 syn match fvwmModule "\<Module\s\+\w\+"he=s+6
57 syn keyword fvwmExec Exec
58 syn match fvwmPath "\<IconPath\s.*$"lc=8 contains=fvwmEnvVar
59 syn match fvwmPath "\<ModulePath\s.*$"lc=10 contains=fvwmEnvVar
60 syn match fvwmPath "\<PixmapPath\s.*$"lc=10 contains=fvwmEnvVar
61 syn match fvwmKey "\<Key\s\+\w\+"he=s+3
62
63 " fvwm1 specific items
Bram Moolenaar071d4272004-06-13 20:20:40 +000064 syn match fvwmEnvVar "\$(\w\+)"
Bram Moolenaar9964e462007-05-05 17:54:07 +000065 syn match fvwmWhitespace contained "\s\+"
66 syn region fvwmStyle oneline keepend
67 \ contains=fvwmString,fvwmKeyword,fvwmWhiteSpace
68 \ matchgroup=fvwmFunction
69 \ start="^\s*Style\>"hs=e-5 end="$"
Bram Moolenaar071d4272004-06-13 20:20:40 +000070
Bram Moolenaar9964e462007-05-05 17:54:07 +000071 syn keyword fvwmFunction AppsBackingStore AutoRaise BackingStore Beep
72 \ BoundaryWidth ButtonStyle CenterOnCirculate
73 \ CirculateDown CirculateHit CirculateSkip
74 \ CirculateSkipIcons CirculateUp ClickTime
75 \ ClickToFocus Close Cursor CursorMove
76 \ DecorateTransients Delete Desk DeskTopScale
77 \ DeskTopSize Destroy DontMoveOff
78 \ EdgeResistance EdgeScroll EndFunction
79 \ EndMenu EndPopup Focus Font Function
80 \ GotoPage HiBackColor HiForeColor Icon
81 \ IconBox IconFont Iconify IconPath Key
82 \ Lenience Lower Maximize MenuBackColor
83 \ MenuForeColor MenuStippleColor Module
84 \ ModulePath Mouse Move MWMBorders MWMButtons
85 \ MWMDecorHints MWMFunctionHints
86 \ MWMHintOverride MWMMenus NoBorder
87 \ NoBoundaryWidth Nop NoPPosition NoTitle
88 \ OpaqueMove OpaqueResize Pager PagerBackColor
89 \ PagerFont PagerForeColor PagingDefault
90 \ PixmapPath Popup Quit Raise RaiseLower
91 \ RandomPlacement Refresh Resize Restart
92 \ SaveUnders Scroll SloppyFocus SmartPlacement
93 \ StartsOnDesk StaysOnTop StdBackColor
94 \ StdForeColor Stick Sticky StickyBackColor
95 \ StickyForeColor StickyIcons
96 \ StubbornIconPlacement StubbornIcons
97 \ StubbornPlacement SuppressIcons Title
98 \ TogglePage Wait Warp WindowFont WindowList
99 \ WindowListSkip WindowsDesk WindowShade
100 \ XORvalue
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101
102 " These keywords are only used after the "Style" command. To avoid
103 " name collision with several commands, they are contained.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000104 syn keyword fvwmKeyword contained
105 \ BackColor BorderWidth BoundaryWidth Button
106 \ CirculateHit CirculateSkip Color DoubleClick
107 \ ForeColor Handles HandleWidth Icon IconTitle
108 \ NoBorder NoBoundaryWidth NoButton NoHandles
109 \ NoIcon NoIconTitle NoTitle Slippery
110 \ StartIconic StartNormal StartsAnyWhere
111 \ StartsOnDesk StaysOnTop StaysPut Sticky
112 \ Title WindowListHit WindowListSkip
113
114" elseif (exists("b:fvwm_version") && b:fvwm_version == 2)
115" \ || (exists("use_fvwm_2") && use_fvwm_2)
116else
117
118 "
119 " Syntax highlighting for fvwm2 files.
120 "
Bram Moolenaar071d4272004-06-13 20:20:40 +0000121 syn match fvwmEnvVar "\${\w\+}"
122 syn match fvwmEnvVar "\$\[[^]]\+\]"
123 syn match fvwmEnvVar "\$[$0-9*]"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000124
Bram Moolenaar9964e462007-05-05 17:54:07 +0000125 syn match fvwmDef contains=fvwmMenuString,fvwmWhitespace
126 \ '^\s*+\s*".\{-}"'
127 syn region fvwmMenuString contains=fvwmIcon,fvwmShortcutKey
128 \ start='^\s*+\s*\zs"' skip='\v\\\\|\\\"' end='"'
129 syn region fvwmIcon contained start='\v\%\%@!' end='%'
130 syn match fvwmShortcutKey contained "&."
Bram Moolenaar071d4272004-06-13 20:20:40 +0000131
Bram Moolenaar9964e462007-05-05 17:54:07 +0000132 syn keyword fvwmModuleName FvwmAnimate FvwmAudio FvwmAuto FvwmBacker
133 \ FvwmBanner FvwmButtons FvwmCommandS
134 \ FvwmConsole FvwmCpp FvwmDebug FvwmDragWell
135 \ FvwmEvent FvwmForm FvwmGtk FvwmIconBox
136 \ FvwmIconMan FvwmIdent FvwmM4 FvwmPager
137 \ FvwmSave FvwmSaveDesk FvwmScript FvwmScroll
138 \ FvwmTaskBar FvwmWinList FvwmWharf
139 " Obsolete fvwmModuleName: FvwmTheme
Bram Moolenaar071d4272004-06-13 20:20:40 +0000140
Bram Moolenaar9964e462007-05-05 17:54:07 +0000141 syn keyword fvwmKeyword AddToMenu ChangeMenuStyle CopyMenuStyle
142 \ DestroyMenu DestroyMenuStyle Menu
143 \ Popup TearMenuOff Title BugOpts BusyCursor
144 \ ClickTime ColorLimit ColormapFocus
145 \ DefaultColors DefaultColorset DefaultFont
146 \ DefaultIcon DefaultLayers Deschedule Emulate
147 \ EscapeFunc FakeClick FakeKeypress GlobalOpts
148 \ HilightColor HilightColorset IconFont
149 \ PrintInfo Repeat Schedule State WindowFont
150 \ XSync XSynchronize AnimatedMove
151 \ HideGeometryWindow Layer Lower Move
152 \ MoveToDesk MoveThreshold MoveToPage
153 \ MoveToScreen OpaqueMoveSize PlaceAgain Raise
154 \ RaiseLower ResizeMaximize ResizeMove
155 \ ResizeMoveMaximize RestackTransients
156 \ SetAnimation SnapAttraction SnapGrid
157 \ WindowsDesk XorPixmap XorValue CursorMove
158 \ FlipFocus Focus WarpToWindow Close Delete
159 \ Destroy Iconify Recapture RecaptureWindow
160 \ Refresh RefreshWindow Stick StickAcrossPages
161 \ StickAcrossDesks WindowShade
162 \ WindowShadeAnimate IgnoreModifiers
163 \ EdgeCommand EdgeLeaveCommand GnomeButton
164 \ Stroke StrokeFunc FocusStyle DestroyStyle
165 \ UpdateStyles AddToDecor BorderStyle
166 \ ChangeDecor DestroyDecor UpdateDecor
167 \ DesktopName DeskTopSize EdgeResistance
168 \ EdgeScroll EdgeThickness EwmhBaseStruts
169 \ EWMHNumberOfDesktops GotoDeskAndPage
170 \ GotoPage Scroll Xinerama
171 \ XineramaPrimaryScreen XineramaSls
172 \ XineramaSlsSize XineramaSlsScreens AddToFunc
173 \ Beep DestroyFunc Echo Exec ExecUseShell
174 \ Function Nop PipeRead Read SetEnv Silent
175 \ UnsetEnv Wait DestroyModuleConfig KillModule
176 \ Module ModuleSynchronous ModuleTimeout
177 \ SendToModule Quit QuitScreen QuitSession
178 \ Restart SaveSession SaveQuitSession KeepRc
179 \ NoWindow Break CleanupColorsets
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180
Bram Moolenaar9964e462007-05-05 17:54:07 +0000181 " Conditional commands
182 syn keyword fvwmKeyword nextgroup=fvwmCondition skipwhite
183 \ All Any Current Next None Pick PointerWindow
184 \ Prev ThisWindow
185 syn keyword fvwmKeyword nextgroup=fvwmDirection skipwhite
186 \ Direction
187 syn keyword fvwmDirection contained nextgroup=fvwmDirection skipwhite
188 \ FromPointer
189 syn keyword fvwmDirection contained nextgroup=fvwmCondition skipwhite
190 \ North Northeast East Southeast South
191 \ Southwest West Northwest Center
192 syn region fvwmCondition contained contains=fvwmCondNames,fvwmString
193 \ matchgroup=fvwmKeyword start='(' skip=','
194 \ end=')'
195 syn keyword fvwmCondNames contained
196 \ AcceptsFocus AnyScreen CirculateHit
197 \ CirculateHitIcon CirculateHitShaded Closable
198 \ CurrentDesk CurrentGlobalPage
199 \ CurrentGlobalPageAnyDesk CurrentPage
200 \ CurrentPageAnyDesk CurrentScreen FixedSize
201 \ Focused HasHandles HasPointer Iconic
202 \ Iconifiable Maximizable Maximized
203 \ Overlapped PlacedByButton3 PlacedByFvwm Raised
204 \ Shaded Sticky StickyAcrossDesks
205 \ StickyAcrossPages Transient Visible
206 syn keyword fvwmCondNames contained skipwhite nextgroup=@fvwmConstants
207 \ State Layer
Bram Moolenaar071d4272004-06-13 20:20:40 +0000208
Bram Moolenaar9964e462007-05-05 17:54:07 +0000209 " Test
210 syn keyword fvwmKeyword nextgroup=fvwmTCond skipwhite
211 \ Test
212 syn region fvwmTCond contained contains=fvwmTCNames,fvwmString
213 \ matchgroup=fvwmKeyword start='(' end=')'
214 syn keyword fvwmTCNames contained
215 \ Version EnvIsSet EnvMatch EdgeHasPointer
216 \ EdgeIsActive Start Init Restart Exit Quit
217 \ ToRestart True False F R W X I
218
219 " TestRc
220 syn keyword fvwmKeyword nextgroup=fvwmTRCond skipwhite
221 \ TestRc
222 syn region fvwmTRCond contained contains=fvwmTRNames,fvwmNumber
223 \ matchgroup=fvwmKeyword start='(' end=')'
224 syn keyword fvwmTRNames contained NoMatch Match Error Break
Bram Moolenaar071d4272004-06-13 20:20:40 +0000225
Bram Moolenaar9964e462007-05-05 17:54:07 +0000226 " Colorsets
227 syn keyword fvwmKeyword nextgroup=fvwmCSArgs skipwhite
228 \ ColorSet
229 syn region fvwmCSArgs contained transparent contains=fvwmCSNames,@fvwmConstants,fvwmString,fvwmRGBValue,fvwmGradient
230 \ start='.' skip='\\$' end='$'
231 syn keyword fvwmCSNames contained
232 \ fg Fore Foreground bg Back Background hi
233 \ Hilite Hilight sh Shade Shadow fgsh Pixmap
234 \ TiledPixmap AspectPixmap RootTransparent
235 \ Shape TiledShape AspectShape Tint fgTint
236 \ bgTint Alpha fgAlpha Dither IconTint
237 \ IconAlpha NoShape Plain Translucent
238 syn match fvwmCSNames contained '\v<Transparent>'
239 syn match fvwmGradient contained '\v<[HVDBSCRY]Gradient>'
240
241 " Styles
242 syn keyword fvwmKeyword nextgroup=fvwmStyleArgs skipwhite
243 \ Style WindowStyle
244 syn region fvwmStyleArgs contained transparent contains=fvwmStyleNames,@fvwmConstants,fvwmString,fvwmRGBValue
245 \ start='.' skip='\\$' end='$'
246 syn keyword fvwmStyleNames contained
247 \ BorderWidth HandleWidth NoIcon Icon MiniIcon
248 \ IconBox IconGrid IconFill IconSize NoTitle
249 \ Title TitleAtBottom TitleAtLeft TitleAtRight
250 \ TitleAtTop LeftTitleRotatedCW
251 \ LeftTitleRotatedCCW RightTitleRotatedCCW
252 \ RightTitleRotatedCW TopTitleRotated
253 \ TopTitleNotRotated BottomTitleRotated
254 \ BottomTitleNotRotated UseTitleDecorRotation
255 \ StippledTitle StippledTitleOff
256 \ IndexedWindowName ExactWindowName
257 \ IndexedIconName ExactIconName Borders
258 \ NoHandles Handles WindowListSkip
259 \ WindowListHit CirculateSkip CirculateHit
260 \ CirculateSkipShaded CirculateHitShaded Layer
261 \ StaysOnTop StaysOnBottom StaysPut Sticky
262 \ Slippery StickyAcrossPages StickyAcrossDesks
263 \ StartIconic StartNormal Color ForeColor
264 \ BackColor Colorset HilightFore HilightBack
265 \ HilightColorset BorderColorset
266 \ HilightBorderColorset IconTitleColorset
267 \ HilightIconTitleColorset
268 \ IconBackgroundColorset IconTitleRelief
269 \ IconBackgroundRelief IconBackgroundPadding
270 \ Font IconFont StartsOnDesk StartsOnPage
271 \ StartsAnyWhere StartsOnScreen
272 \ ManualPlacementHonorsStartsOnPage
273 \ ManualPlacementIgnoresStartsOnPage
274 \ CaptureHonorsStartsOnPage
275 \ CaptureIgnoresStartsOnPage
276 \ RecaptureHonorsStartsOnPage
277 \ RecaptureIgnoresStartsOnPage
278 \ StartsOnPageIncludesTransients
279 \ StartsOnPageIgnoresTransients IconTitle
280 \ NoIconTitle MwmButtons FvwmButtons MwmBorder
281 \ FvwmBorder MwmDecor NoDecorHint MwmFunctions
282 \ NoFuncHint HintOverride NoOverride NoButton
283 \ Button ResizeHintOverride NoResizeOverride
284 \ OLDecor NoOLDecor GNOMEUseHints
285 \ GNOMEIgnoreHints StickyIcon SlipperyIcon
286 \ StickyAcrossPagesIcon StickyAcrossDesksIcon
287 \ ManualPlacement CascadePlacement
288 \ MinOverlapPlacement
289 \ MinOverlapPercentPlacement
290 \ TileManualPlacement TileCascadePlacement
291 \ CenterPlacement MinOverlapPlacementPenalties
292 \ MinOverlapPercentPlacementPenalties
293 \ DecorateTransient NakedTransient
294 \ DontRaiseTransient RaiseTransient
295 \ DontLowerTransient LowerTransient
296 \ DontStackTransientParent
297 \ StackTransientParent SkipMapping ShowMapping
298 \ ScatterWindowGroups KeepWindowGroupsOnDesk
299 \ UseDecor UseStyle NoPPosition UsePPosition
300 \ NoUSPosition UseUSPosition
301 \ NoTransientPPosition UseTransientPPosition
302 \ NoTransientUSPosition UseTransientUSPosition
303 \ NoIconPosition UseIconPosition Lenience
304 \ NoLenience ClickToFocus SloppyFocus
305 \ MouseFocus FocusFollowsMouse NeverFocus
306 \ ClickToFocusPassesClickOff
307 \ ClickToFocusPassesClick
308 \ ClickToFocusRaisesOff ClickToFocusRaises
309 \ MouseFocusClickRaises
310 \ MouseFocusClickRaisesOff GrabFocus
311 \ GrabFocusOff GrabFocusTransientOff
312 \ GrabFocusTransient FPFocusClickButtons
313 \ FPFocusClickModifiers
314 \ FPSortWindowlistByFocus FPClickRaisesFocused
315 \ FPClickDecorRaisesFocused
316 \ FPClickIconRaisesFocused
317 \ FPClickRaisesUnfocused
318 \ FPClickDecorRaisesUnfocused
319 \ FPClickIconRaisesUnfocused FPClickToFocus
320 \ FPClickDecorToFocus FPClickIconToFocus
321 \ FPEnterToFocus FPLeaveToUnfocus
322 \ FPFocusByProgram FPFocusByFunction
323 \ FPFocusByFunctionWarpPointer FPLenient
324 \ FPPassFocusClick FPPassRaiseClick
325 \ FPIgnoreFocusClickMotion
326 \ FPIgnoreRaiseClickMotion
327 \ FPAllowFocusClickFunction
328 \ FPAllowRaiseClickFunction FPGrabFocus
329 \ FPGrabFocusTransient FPOverrideGrabFocus
330 \ FPReleaseFocus FPReleaseFocusTransient
331 \ FPOverrideReleaseFocus StartsLowered
332 \ StartsRaised IgnoreRestack AllowRestack
333 \ FixedPosition VariablePosition
334 \ FixedUSPosition VariableUSPosition
335 \ FixedPPosition VariablePPosition FixedSize
336 \ VariableSize FixedUSSize VariableUSSize
337 \ FixedPSize VariablePSize Closable
338 \ Iconifiable Maximizable
339 \ AllowMaximizeFixedSize IconOverride
340 \ NoIconOverride NoActiveIconOverride
341 \ DepressableBorder FirmBorder MaxWindowSize
342 \ IconifyWindowGroups IconifyWindowGroupsOff
343 \ ResizeOpaque ResizeOutline BackingStore
344 \ BackingStoreOff BackingStoreWindowDefault
345 \ Opacity ParentalRelativity SaveUnder
346 \ SaveUnderOff WindowShadeShrinks
347 \ WindowShadeScrolls WindowShadeSteps
348 \ WindowShadeAlwaysLazy WindowShadeBusy
349 \ WindowShadeLazy EWMHDonateIcon
350 \ EWMHDontDonateIcon EWMHDonateMiniIcon
351 \ EWMHDontDonateMiniIcon EWMHMiniIconOverride
352 \ EWMHNoMiniIconOverride
353 \ EWMHUseStackingOrderHints
354 \ EWMHIgnoreStackingOrderHints
355 \ EWMHIgnoreStateHints EWMHUseStateHints
356 \ EWMHIgnoreStrutHints EWMHUseStrutHints
357 \ EWMHMaximizeIgnoreWorkingArea
358 \ EWMHMaximizeUseWorkingArea
359 \ EWMHMaximizeUseDynamicWorkingArea
360 \ EWMHPlacementIgnoreWorkingArea
361 \ EWMHPlacementUseWorkingArea
362 \ EWMHPlacementUseDynamicWorkingArea
363 \ MoveByProgramMethod Unmanaged State
364
365 " Cursor styles
366 syn keyword fvwmKeyword nextgroup=fvwmCursorStyle skipwhite
367 \ CursorStyle
368 syn case match
369 syn keyword fvwmCursorStyle contained
370 \ POSITION TITLE DEFAULT SYS MOVE RESIZE WAIT
371 \ MENU SELECT DESTROY TOP RIGHT BOTTOM LEFT
372 \ TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT
373 \ TOP_EDGE RIGHT_EDGE BOTTOM_EDGE LEFT_EDGE
374 \ ROOT STROKE
375 syn case ignore
376
377 " Menu style
378 syn keyword fvwmKeyword nextgroup=fvwmMStyleArgs skipwhite
379 \ MenuStyle
380 syn region fvwmMStyleArgs contained transparent contains=fvwmMStyleNames,@fvwmConstants,fvwmString,fvwmGradient,fvwmRGBValue
381 \ start='.' skip='\\$' end='$'
382 syn keyword fvwmMStyleNames contained
383 \ Fvwm Mwm Win BorderWidth Foreground
384 \ Background Greyed HilightBack HilightBackOff
385 \ ActiveFore ActiveForeOff MenuColorset
386 \ ActiveColorset GreyedColorset Hilight3DThick
387 \ Hilight3DThin Hilight3DOff
388 \ Hilight3DThickness Animation AnimationOff
389 \ Font MenuFace PopupDelay PopupOffset
390 \ TitleWarp TitleWarpOff TitleUnderlines0
391 \ TitleUnderlines1 TitleUnderlines2
392 \ SeparatorsLong SeparatorsShort
393 \ TrianglesSolid TrianglesRelief
394 \ PopupImmediately PopupDelayed
395 \ PopdownImmediately PopdownDelayed
396 \ PopupActiveArea DoubleClickTime SidePic
397 \ SideColor PopupAsRootMenu PopupAsSubmenu
398 \ PopupIgnore PopupClose RemoveSubmenus
399 \ HoldSubmenus SubmenusRight SubmenusLeft
400 \ SelectOnRelease ItemFormat
401 \ VerticalItemSpacing VerticalTitleSpacing
402 \ AutomaticHotkeys AutomaticHotkeysOff
403
404 " Button style
405 syn keyword fvwmKeyword nextgroup=fvwmBNum skipwhite
406 \ ButtonStyle AddButtonStyle
407 syn match fvwmBNum contained
408 \ nextgroup=fvwmBState,fvwmBStyleArgs skipwhite
409 \ '\v<([0-9]|All|Left|Right|Reset)>'
410 syn keyword fvwmBState contained nextgroup=fvwmBStyleArgs skipwhite
411 \ ActiveUp ActiveDown InactiveUp InactiveDown
412 \ Active Inactive ToggledActiveUp
413 \ ToggledActiveDown ToggledInactiveUp
414 \ ToggledInactiveDown ToggledActive
415 \ ToggledInactive AllNormal AllToggled
416 \ AllActive AllInactive AllUp AllDown
417 syn region fvwmBStyleArgs contained contains=fvwmBStyleFlags,fvwmBStyleNames,fvwmGradient,fvwmRGBValue,@fvwmConstants,fvwmString
418 \ start='\S' skip='\\$' end='$'
419 syn keyword fvwmBStyleNames contained
420 \ Simple Default Solid Colorset Vector Pixmap
421 \ AdjustedPixmap ShrunkPixmap StretchedPixmap
422 \ TiledPixmap MiniIcon
423 syn keyword fvwmBStyleFlags contained
424 \ Raised Sunk Flat UseTitleStyle
425 \ UseBorderStyle
426
427 " Border style
428 syn keyword fvwmKeyword skipwhite nextgroup=fvwmBdState,fvwmBdStyleArgs
429 \ BorderStyle
430 syn keyword fvwmBdState contained skipwhite nextgroup=fvwmBdStyleArgs
431 \ Active Inactive
432 syn region fvwmBdStyleArgs contained contains=fvwmBdStyNames,fvwmBdStyFlags
433 \ start='\S' skip='\\$' end='$'
434 syn keyword fvwmBdStyNames contained
435 \ TiledPixmap Colorset
436 syn keyword fvwmBdStyFlags contained
437 \ HiddenHandles NoInset Raised Sunk Flat
438
439 " Title styles
440 syn keyword fvwmKeyword skipwhite nextgroup=fvwmTState,fvwmTStyleArgs
441 \ TitleStyle AddTitleStyle
442 syn keyword fvwmTState contained skipwhite nextgroup=fvwmTStyleArgs
443 \ ActiveUp ActiveDown InactiveUp InactiveDown
444 \ Active Inactive ToggledActiveUp
445 \ ToggledActiveDown ToggledInactiveUp
446 \ ToggledInactiveDown ToggledActive
447 \ ToggledInactive AllNormal AllToggled
448 \ AllActive AllInactive AllUp AllDown
449 syn region fvwmTStyleArgs contained contains=fvwmBStyleNames,fvwmTStyleNames,fvwmMPmapNames,fvwmTStyleFlags,fvwmGradient,fvwmRGBValue,@fvwmConstants
450 \ start='\S' skip='\\$' end='$'
451 syn keyword fvwmTStyleNames contained
452 \ MultiPixmap
453 syn keyword fvwmTStyleNames contained
454 \ LeftJustified Centered RightJustified Height
455 \ MinHeight
456 syn keyword fvwmMPmapNames contained
457 \ Main LeftMain RightMain UnderText LeftOfText
458 \ RightOfText LeftEnd RightEnd Buttons
459 \ LeftButtons RightButtons
460 syn keyword fvwmTStyleFlags contained
461 \ Raised Flat Sunk
462
463 " Button state
464 syn keyword fvwmKeyword nextgroup=fvwmBStateArgs
465 \ ButtonState
466 syn region fvwmBStateArgs contained contains=fvwmBStateTF,fvwmBStateNames
467 \ start='.' skip='\\$' end='$'
468 syn keyword fvwmBStateNames contained ActiveDown Inactive InactiveDown
469 syn keyword fvwmBStateTF contained True False
470
471 " Paths
472 syn keyword fvwmKeyword nextgroup=fvwmPath skipwhite
473 \ IconPath ImagePath LocalePath PixmapPath
474 \ ModulePath
475 syn match fvwmPath contained contains=fvwmEnvVar '\v.+$'
476
477 " Window list command
478 syn keyword fvwmKeyword nextgroup=fvwmWLArgs skipwhite
479 \ WindowList
480 syn region fvwmWLArgs contained
481 \ contains=fvwmCondition,@fvwmConstants,fvwmString,fvwmWLOpts
482 \ start='.' skip='\\$' end='$'
483 syn keyword fvwmWLOpts contained
484 \ Geometry NoGeometry NoGeometryWithInfo
485 \ NoDeskNum NoNumInDeskTitle
486 \ NoCurrentDeskTitle MaxLabelWidth width
487 \ TitleForAllDesks Function funcname Desk
488 \ desknum CurrentDesk NoIcons Icons OnlyIcons
489 \ NoNormal Normal OnlyNormal NoSticky Sticky
490 \ OnlySticky NoStickyAcrossPages
491 \ StickyAcrossPages OnlyStickyAcrossPages
492 \ NoStickyAcrossDesks StickyAcrossDesks
493 \ OnlyStickyAcrossDesks NoOnTop OnTop
494 \ OnlyOnTop NoOnBottom OnBottom OnlyOnBottom
495 \ Layer UseListSkip OnlyListSkip NoDeskSort
496 \ ReverseOrder CurrentAtEnd IconifiedAtEnd
497 \ UseIconName Alphabetic NotAlphabetic
498 \ SortByResource SortByClass NoHotkeys
499 \ SelectOnRelease
500
501 syn keyword fvwmSpecialFn StartFunction InitFunction RestartFunction
502 \ ExitFunction SessionInitFunction
503 \ SessionRestartFunction SessionExitFunction
504 \ MissingSubmenuFunction WindowListFunc
505
506 syn keyword fvwmKeyword skipwhite nextgroup=fvwmKeyWin,fvwmKeyName
507 \ Key PointerKey
508 syn region fvwmKeyWin contained skipwhite nextgroup=fvwmKeyName
509 \ start='(' end=')'
510 syn case match
511 syn match fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext
512 \ '\v<([a-zA-Z0-9]|F\d+|KP_\d)>'
513 syn keyword fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext
514 \ BackSpace Begin Break Cancel Clear Delete
515 \ Down End Escape Execute Find Help Home
516 \ Insert KP_Add KP_Begin KP_Decimal KP_Delete
517 \ KP_Divide KP_Down KP_End KP_Enter KP_Equal
518 \ KP_Home KP_Insert KP_Left KP_Multiply
519 \ KP_Next KP_Page_Down KP_Page_Up KP_Prior
520 \ KP_Right KP_Separator KP_Space KP_Subtract
521 \ KP_Tab KP_Up Left Linefeed Menu Mode_switch
522 \ Next Num_Lock Page_Down Page_Up Pause Print
523 \ Prior Redo Return Right script_switch
524 \ Scroll_Lock Select Sys_Req Tab Undo Up space
525 \ exclam quotedbl numbersign dollar percent
526 \ ampersand apostrophe quoteright parenleft
527 \ parenright asterisk plus comma minus period
528 \ slash colon semicolon less equal greater
529 \ question at bracketleft backslash
530 \ bracketright asciicircum underscore grave
531 \ quoteleft braceleft bar braceright
532 \ asciitilde
533
534 syn match fvwmKeyContext contained skipwhite nextgroup=fvwmKeyMods
535 \ '\v<[][RWDTS_F<^>vI0-9AM-]+>'
536 syn match fvwmKeyMods contained '\v[NCSMLA1-5]+'
537 syn case ignore
538
539 syn keyword fvwmKeyword skipwhite nextgroup=fvwmMouseWin,fvwmMouseButton
540 \ Mouse
541 syn region fvwmMouseWin contained skipwhite nextgroup=fvwmMouseButton
542 \ start='(' end=')'
543 syn match fvwmMouseButton contained skipwhite nextgroup=fvwmKeyContext
544 \ '[0-5]'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000545endif
546
Bram Moolenaar9964e462007-05-05 17:54:07 +0000547" Define syntax highlighting groups
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548
Bram Moolenaar9964e462007-05-05 17:54:07 +0000549"
550" Common highlighting groups
551"
552hi def link fvwmComment Comment
553hi def link fvwmEnvVar Macro
554hi def link fvwmNumber Number
555hi def link fvwmKeyword Keyword
556hi def link fvwmPath Constant
557hi def link fvwmModConf Macro
558hi def link fvwmRGBValue Constant
559hi def link fvwmString String
560hi def link fvwmBackslash SpecialChar
Bram Moolenaar071d4272004-06-13 20:20:40 +0000561
Bram Moolenaar071d4272004-06-13 20:20:40 +0000562
Bram Moolenaar9964e462007-05-05 17:54:07 +0000563"
564" Highlighting groups for fvwm1 specific items
565"
566hi def link fvwmExec fvwmKeyword
567hi def link fvwmKey fvwmKeyword
568hi def link fvwmModule fvwmKeyword
569hi def link fvwmFunction Function
570
571"
572" Highlighting groups for fvwm2 specific items
573"
574hi def link fvwmSpecialFn Type
575hi def link fvwmCursorStyle fvwmStyleNames
576hi def link fvwmStyleNames Identifier
577hi def link fvwmMStyleNames fvwmStyleNames
578hi def link fvwmCSNames fvwmStyleNames
579hi def link fvwmGradient fvwmStyleNames
580hi def link fvwmCondNames fvwmStyleNames
581hi def link fvwmTCNames fvwmStyleNames
582hi def link fvwmTRNames fvwmStyleNames
583hi def link fvwmWLOpts fvwmStyleNames
584
585hi def link fvwmBNum Number
586hi def link fvwmBState Type
587hi def link fvwmBStyleNames fvwmStyleNames
588hi def link fvwmBStyleFlags Special
589
590hi def link fvwmBStateTF Constant
591hi def link fvwmBStateNames fvwmStyleNames
592
593hi def link fvwmBdState fvwmBState
594hi def link fvwmBdStyNames fvwmStyleNames
595hi def link fvwmBdStyFlags fvwmBStyleFlags
596
597hi def link fvwmTState fvwmBState
598hi def link fvwmTStyleNames fvwmStyleNames
599hi def link fvwmMPmapNames fvwmBStyleFlags
600hi def link fvwmTStyleFlags fvwmBStyleFlags
601
602hi def link fvwmDirection fvwmBStyleFlags
603
604hi def link fvwmKeyWin Constant
605hi def link fvwmMouseWin fvwmKeyWin
606hi def link fvwmKeyName Special
607hi def link fvwmKeyContext fvwmKeyName
608hi def link fvwmKeyMods fvwmKeyName
609hi def link fvwmMouseButton fvwmKeyName
610
611hi def link fvwmMenuString String
612hi def link fvwmIcon Type
613hi def link fvwmShortcutKey SpecialChar
614
615hi def link fvwmModuleName Function
Bram Moolenaar071d4272004-06-13 20:20:40 +0000616
617let b:current_syntax = "fvwm"