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