From 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:44:24 +0200 Subject: Adding upstream version 2:8.1.0875. Signed-off-by: Daniel Baumann --- runtime/syntax/fvwm.vim | 642 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 642 insertions(+) create mode 100644 runtime/syntax/fvwm.vim (limited to 'runtime/syntax/fvwm.vim') diff --git a/runtime/syntax/fvwm.vim b/runtime/syntax/fvwm.vim new file mode 100644 index 0000000..2f96bab --- /dev/null +++ b/runtime/syntax/fvwm.vim @@ -0,0 +1,642 @@ +" Vim syntax file for Fvwm-2.5.22 +" Language: Fvwm{1,2} configuration file +" Maintainer: Gautam Iyer +" Previous Maintainer: Haakon Riiser +" Last Change: Sat 29 Sep 2007 11:08:34 AM PDT +" +" Thanks to David Necas (Yeti) for adding Fvwm 2.4 support. +" +" 2006-05-09 gi1242: Rewrote fvwm2 syntax completely. Also since fvwm1 is now +" mostly obsolete, made the syntax file pick fvwm2 syntax by default. + +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" Fvwm configuration files are case insensitive +syn case ignore + +" Identifiers in Fvwm can contain most characters, so we only +" include the most common ones here. +setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57 + +" Syntax items common to fvwm1 and fvwm2 config files +syn cluster fvwmConstants contains=fvwmEnvVar,fvwmNumber +syn match fvwmEnvVar "\$\w\+" +syn match fvwmNumber '\v<(\d+|0x[0-9a-f]+)>' + +syn match fvwmModConf nextgroup=fvwmModArg "\v^\s*\*\a+" +syn region fvwmModArg contained contains=fvwmString,fvwmRGBValue + \ start='.' skip='\\$' end='$' + +syn region fvwmString contains=fvwmBackslash start='"' + \ matchgroup=fvwmBackslash skip='\v\\"' end='"' +syn region fvwmString contains=fvwmBackslash start='`' + \ matchgroup=fvwmBackslash skip='\v\\`' end='`' +syn region fvwmString contains=fvwmBackslash start="'" + \ matchgroup=fvwmBackslash skip="\v\\'" end="'" +syn match fvwmBackslash contained '\\[^"'`]' + +syn match fvwmRGBValue "#\x\{3}" +syn match fvwmRGBValue "#\x\{6}" +syn match fvwmRGBValue "#\x\{9}" +syn match fvwmRGBValue "#\x\{12}" +syn match fvwmRGBValue "rgb:\x\{1,4}/\x\{1,4}/\x\{1,4}" + +syn region fvwmComment contains=@Spell + \ start='^\s*#\s' skip='\\$' end='$' +syn region fvwmComment start="\v^\s*#(\S|$)" skip='\\$' end='$' + +if (exists("b:fvwm_version") && b:fvwm_version == 1) + \ || (exists("use_fvwm_1") && use_fvwm_1) + + " + " Syntax highlighting for Fvwm1 files. + " + + " Moved from common syntax items + syn match fvwmModule "\' + syn match fvwmGradient contained '\v<[HVDBSCRY]Gradient>' + + " Styles + syn keyword fvwmKeyword nextgroup=fvwmStyleArgs skipwhite + \ Style WindowStyle + syn region fvwmStyleArgs contained transparent contains=fvwmStyleNames,@fvwmConstants,fvwmString,fvwmRGBValue + \ start='.' skip='\\$' end='$' + syn keyword fvwmStyleNames contained + \ BorderWidth HandleWidth NoIcon Icon MiniIcon + \ IconBox IconGrid IconFill IconSize NoTitle + \ Title TitleAtBottom TitleAtLeft TitleAtRight + \ TitleAtTop LeftTitleRotatedCW + \ LeftTitleRotatedCCW RightTitleRotatedCCW + \ RightTitleRotatedCW TopTitleRotated + \ TopTitleNotRotated BottomTitleRotated + \ BottomTitleNotRotated UseTitleDecorRotation + \ StippledTitle StippledTitleOff + \ IndexedWindowName ExactWindowName + \ IndexedIconName ExactIconName Borders + \ NoHandles Handles WindowListSkip + \ WindowListHit CirculateSkip CirculateHit + \ CirculateSkipShaded CirculateHitShaded Layer + \ StaysOnTop StaysOnBottom StaysPut Sticky + \ Slippery StickyAcrossPages StickyAcrossDesks + \ StartIconic StartNormal Color ForeColor + \ BackColor Colorset HilightFore HilightBack + \ HilightColorset BorderColorset + \ HilightBorderColorset IconTitleColorset + \ HilightIconTitleColorset + \ IconBackgroundColorset IconTitleRelief + \ IconBackgroundRelief IconBackgroundPadding + \ Font IconFont StartsOnDesk StartsOnPage + \ StartsAnyWhere StartsOnScreen + \ ManualPlacementHonorsStartsOnPage + \ ManualPlacementIgnoresStartsOnPage + \ CaptureHonorsStartsOnPage + \ CaptureIgnoresStartsOnPage + \ RecaptureHonorsStartsOnPage + \ RecaptureIgnoresStartsOnPage + \ StartsOnPageIncludesTransients + \ StartsOnPageIgnoresTransients IconTitle + \ NoIconTitle MwmButtons FvwmButtons MwmBorder + \ FvwmBorder MwmDecor NoDecorHint MwmFunctions + \ NoFuncHint HintOverride NoOverride NoButton + \ Button ResizeHintOverride NoResizeOverride + \ OLDecor NoOLDecor GNOMEUseHints + \ GNOMEIgnoreHints StickyIcon SlipperyIcon + \ StickyAcrossPagesIcon StickyAcrossDesksIcon + \ ManualPlacement CascadePlacement + \ MinOverlapPlacement + \ MinOverlapPercentPlacement + \ TileManualPlacement TileCascadePlacement + \ MinOverlapPlacementPenalties + \ MinOverlapPercentPlacementPenalties + \ DecorateTransient NakedTransient + \ DontRaiseTransient RaiseTransient + \ DontLowerTransient LowerTransient + \ DontStackTransientParent + \ StackTransientParent SkipMapping ShowMapping + \ ScatterWindowGroups KeepWindowGroupsOnDesk + \ UseDecor UseStyle NoPPosition UsePPosition + \ NoUSPosition UseUSPosition + \ NoTransientPPosition UseTransientPPosition + \ NoTransientUSPosition UseTransientUSPosition + \ NoIconPosition UseIconPosition Lenience + \ NoLenience ClickToFocus SloppyFocus + \ MouseFocus FocusFollowsMouse NeverFocus + \ ClickToFocusPassesClickOff + \ ClickToFocusPassesClick + \ ClickToFocusRaisesOff ClickToFocusRaises + \ MouseFocusClickRaises + \ MouseFocusClickRaisesOff GrabFocus + \ GrabFocusOff GrabFocusTransientOff + \ GrabFocusTransient FPFocusClickButtons + \ FPFocusClickModifiers + \ FPSortWindowlistByFocus FPClickRaisesFocused + \ FPClickDecorRaisesFocused + \ FPClickIconRaisesFocused + \ FPClickRaisesUnfocused + \ FPClickDecorRaisesUnfocused + \ FPClickIconRaisesUnfocused FPClickToFocus + \ FPClickDecorToFocus FPClickIconToFocus + \ FPEnterToFocus FPLeaveToUnfocus + \ FPFocusByProgram FPFocusByFunction + \ FPFocusByFunctionWarpPointer FPLenient + \ FPPassFocusClick FPPassRaiseClick + \ FPIgnoreFocusClickMotion + \ FPIgnoreRaiseClickMotion + \ FPAllowFocusClickFunction + \ FPAllowRaiseClickFunction FPGrabFocus + \ FPGrabFocusTransient FPOverrideGrabFocus + \ FPReleaseFocus FPReleaseFocusTransient + \ FPOverrideReleaseFocus StartsLowered + \ StartsRaised IgnoreRestack AllowRestack + \ FixedPosition VariablePosition + \ FixedUSPosition VariableUSPosition + \ FixedPPosition VariablePPosition FixedSize + \ VariableSize FixedUSSize VariableUSSize + \ FixedPSize VariablePSize Closable + \ Iconifiable Maximizable + \ AllowMaximizeFixedSize IconOverride + \ NoIconOverride NoActiveIconOverride + \ DepressableBorder FirmBorder MaxWindowSize + \ IconifyWindowGroups IconifyWindowGroupsOff + \ ResizeOpaque ResizeOutline BackingStore + \ BackingStoreOff BackingStoreWindowDefault + \ Opacity ParentalRelativity SaveUnder + \ SaveUnderOff WindowShadeShrinks + \ WindowShadeScrolls WindowShadeSteps + \ WindowShadeAlwaysLazy WindowShadeBusy + \ WindowShadeLazy EWMHDonateIcon + \ EWMHDontDonateIcon EWMHDonateMiniIcon + \ EWMHDontDonateMiniIcon EWMHMiniIconOverride + \ EWMHNoMiniIconOverride + \ EWMHUseStackingOrderHints + \ EWMHIgnoreStackingOrderHints + \ EWMHIgnoreStateHints EWMHUseStateHints + \ EWMHIgnoreStrutHints EWMHIgnoreWindowType + \ EWMHUseStrutHints + \ EWMHMaximizeIgnoreWorkingArea + \ EWMHMaximizeUseWorkingArea + \ EWMHMaximizeUseDynamicWorkingArea + \ EWMHPlacementIgnoreWorkingArea + \ EWMHPlacementUseWorkingArea + \ EWMHPlacementUseDynamicWorkingArea + \ MoveByProgramMethod Unmanaged State + \ StippledIconTitle StickyStippledTitle + \ StickyStippledIconTitle + \ PositionPlacement + \ UnderMousePlacementHonorsStartsOnPage + \ UnderMousePlacementIgnoresStartsOnPage + \ MinOverlapPlacementPenalties + \ MinOverlapPercentPlacementPenalties + \ MinWindowSize StartShaded + + " Cursor styles + syn keyword fvwmKeyword nextgroup=fvwmCursorStyle skipwhite + \ CursorStyle + syn case match + syn keyword fvwmCursorStyle contained + \ POSITION TITLE DEFAULT SYS MOVE RESIZE WAIT + \ MENU SELECT DESTROY TOP RIGHT BOTTOM LEFT + \ TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT + \ TOP_EDGE RIGHT_EDGE BOTTOM_EDGE LEFT_EDGE + \ ROOT STROKE + syn case ignore + + " Menu style + syn keyword fvwmKeyword nextgroup=fvwmMStyleArgs skipwhite + \ MenuStyle + syn region fvwmMStyleArgs contained transparent contains=fvwmMStyleNames,@fvwmConstants,fvwmString,fvwmGradient,fvwmRGBValue + \ start='.' skip='\\$' end='$' + syn keyword fvwmMStyleNames contained + \ Fvwm Mwm Win BorderWidth Foreground + \ Background Greyed HilightBack HilightBackOff + \ ActiveFore ActiveForeOff MenuColorset + \ ActiveColorset GreyedColorset Hilight3DThick + \ Hilight3DThin Hilight3DOff + \ Hilight3DThickness Animation AnimationOff + \ Font MenuFace PopupDelay PopupOffset + \ TitleWarp TitleWarpOff TitleUnderlines0 + \ TitleUnderlines1 TitleUnderlines2 + \ SeparatorsLong SeparatorsShort + \ TrianglesSolid TrianglesRelief + \ PopupImmediately PopupDelayed + \ PopdownImmediately PopdownDelayed + \ PopupActiveArea DoubleClickTime SidePic + \ SideColor PopupAsRootMenu PopupAsSubmenu + \ PopupIgnore PopupClose RemoveSubmenus + \ HoldSubmenus SubmenusRight SubmenusLeft + \ SelectOnRelease ItemFormat + \ VerticalItemSpacing VerticalTitleSpacing + \ AutomaticHotkeys AutomaticHotkeysOff + \ TitleFont TitleColorset HilightTitleBack + + " Button style + syn keyword fvwmKeyword nextgroup=fvwmBNum skipwhite + \ ButtonStyle AddButtonStyle + syn match fvwmBNum contained + \ nextgroup=fvwmBState,fvwmBStyleArgs skipwhite + \ '\v<([0-9]|All|Left|Right|Reset)>' + syn keyword fvwmBState contained nextgroup=fvwmBStyleArgs skipwhite + \ ActiveUp ActiveDown InactiveUp InactiveDown + \ Active Inactive ToggledActiveUp + \ ToggledActiveDown ToggledInactiveUp + \ ToggledInactiveDown ToggledActive + \ ToggledInactive AllNormal AllToggled + \ AllActive AllInactive AllUp AllDown + syn region fvwmBStyleArgs contained contains=fvwmBStyleFlags,fvwmBStyleNames,fvwmGradient,fvwmRGBValue,@fvwmConstants,fvwmString + \ start='\S' skip='\\$' end='$' + syn keyword fvwmBStyleNames contained + \ Simple Default Solid Colorset Vector Pixmap + \ AdjustedPixmap ShrunkPixmap StretchedPixmap + \ TiledPixmap MiniIcon + syn keyword fvwmBStyleFlags contained + \ Raised Sunk Flat UseTitleStyle + \ UseBorderStyle + + " Border style + syn keyword fvwmKeyword skipwhite nextgroup=fvwmBdState,fvwmBdStyleArgs + \ BorderStyle + syn keyword fvwmBdState contained skipwhite nextgroup=fvwmBdStyleArgs + \ Active Inactive + syn region fvwmBdStyleArgs contained contains=fvwmBdStyNames,fvwmBdStyFlags + \ start='\S' skip='\\$' end='$' + syn keyword fvwmBdStyNames contained + \ TiledPixmap Colorset + syn keyword fvwmBdStyFlags contained + \ HiddenHandles NoInset Raised Sunk Flat + + " Title styles + syn keyword fvwmKeyword skipwhite nextgroup=fvwmTState,fvwmTStyleArgs + \ TitleStyle AddTitleStyle + syn keyword fvwmTState contained skipwhite nextgroup=fvwmTStyleArgs + \ ActiveUp ActiveDown InactiveUp InactiveDown + \ Active Inactive ToggledActiveUp + \ ToggledActiveDown ToggledInactiveUp + \ ToggledInactiveDown ToggledActive + \ ToggledInactive AllNormal AllToggled + \ AllActive AllInactive AllUp AllDown + syn region fvwmTStyleArgs contained contains=fvwmBStyleNames,fvwmTStyleNames,fvwmMPmapNames,fvwmTStyleFlags,fvwmGradient,fvwmRGBValue,@fvwmConstants + \ start='\S' skip='\\$' end='$' + syn keyword fvwmTStyleNames contained + \ MultiPixmap + syn keyword fvwmTStyleNames contained + \ LeftJustified Centered RightJustified Height + \ MinHeight + syn keyword fvwmMPmapNames contained + \ Main LeftMain RightMain UnderText LeftOfText + \ RightOfText LeftEnd RightEnd Buttons + \ LeftButtons RightButtons + syn keyword fvwmTStyleFlags contained + \ Raised Flat Sunk + + " Button state + syn keyword fvwmKeyword nextgroup=fvwmBStateArgs + \ ButtonState + syn region fvwmBStateArgs contained contains=fvwmBStateTF,fvwmBStateNames + \ start='.' skip='\\$' end='$' + syn keyword fvwmBStateNames contained ActiveDown Inactive InactiveDown + syn keyword fvwmBStateTF contained True False + + " Paths + syn keyword fvwmKeyword nextgroup=fvwmPath skipwhite + \ IconPath ImagePath LocalePath PixmapPath + \ ModulePath + syn match fvwmPath contained contains=fvwmEnvVar '\v.+$' + + " Window list command + syn keyword fvwmKeyword nextgroup=fvwmWLArgs skipwhite + \ WindowList + syn region fvwmWLArgs contained + \ contains=fvwmCondition,@fvwmConstants,fvwmString,fvwmWLOpts + \ start='.' skip='\\$' end='$' + syn keyword fvwmWLOpts contained + \ Geometry NoGeometry NoGeometryWithInfo + \ NoDeskNum NoNumInDeskTitle + \ NoCurrentDeskTitle MaxLabelWidth width + \ TitleForAllDesks Function funcname Desk + \ desknum CurrentDesk NoIcons Icons OnlyIcons + \ NoNormal Normal OnlyNormal NoSticky Sticky + \ OnlySticky NoStickyAcrossPages + \ StickyAcrossPages OnlyStickyAcrossPages + \ NoStickyAcrossDesks StickyAcrossDesks + \ OnlyStickyAcrossDesks NoOnTop OnTop + \ OnlyOnTop NoOnBottom OnBottom OnlyOnBottom + \ Layer UseListSkip OnlyListSkip NoDeskSort + \ ReverseOrder CurrentAtEnd IconifiedAtEnd + \ UseIconName Alphabetic NotAlphabetic + \ SortByResource SortByClass NoHotkeys + \ SelectOnRelease + + syn keyword fvwmSpecialFn StartFunction InitFunction RestartFunction + \ ExitFunction SessionInitFunction + \ SessionRestartFunction SessionExitFunction + \ MissingSubmenuFunction WindowListFunc + + syn keyword fvwmKeyword skipwhite nextgroup=fvwmKeyWin,fvwmKeyName + \ Key PointerKey + syn region fvwmKeyWin contained skipwhite nextgroup=fvwmKeyName + \ start='(' end=')' + syn case match + syn match fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext + \ '\v<([a-zA-Z0-9]|F\d+|KP_\d)>' + syn keyword fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext + \ BackSpace Begin Break Cancel Clear Delete + \ Down End Escape Execute Find Help Home + \ Insert KP_Add KP_Begin KP_Decimal KP_Delete + \ KP_Divide KP_Down KP_End KP_Enter KP_Equal + \ KP_Home KP_Insert KP_Left KP_Multiply + \ KP_Next KP_Page_Down KP_Page_Up KP_Prior + \ KP_Right KP_Separator KP_Space KP_Subtract + \ KP_Tab KP_Up Left Linefeed Menu Mode_switch + \ Next Num_Lock Page_Down Page_Up Pause Print + \ Prior Redo Return Right script_switch + \ Scroll_Lock Select Sys_Req Tab Undo Up space + \ exclam quotedbl numbersign dollar percent + \ ampersand apostrophe quoteright parenleft + \ parenright asterisk plus comma minus period + \ slash colon semicolon less equal greater + \ question at bracketleft backslash + \ bracketright asciicircum underscore grave + \ quoteleft braceleft bar braceright + \ asciitilde + + syn match fvwmKeyContext contained skipwhite nextgroup=fvwmKeyMods + \ '\v<[][RWDTS_F<^>vI0-9AM-]+>' + syn match fvwmKeyMods contained '\v[NCSMLA1-5]+' + syn case ignore + + syn keyword fvwmKeyword skipwhite nextgroup=fvwmMouseWin,fvwmMouseButton + \ Mouse + syn region fvwmMouseWin contained skipwhite nextgroup=fvwmMouseButton + \ start='(' end=')' + syn match fvwmMouseButton contained skipwhite nextgroup=fvwmKeyContext + \ '[0-5]' +endif + +" Define syntax highlighting groups + +" +" Common highlighting groups +" +hi def link fvwmComment Comment +hi def link fvwmEnvVar Macro +hi def link fvwmNumber Number +hi def link fvwmKeyword Keyword +hi def link fvwmPath Constant +hi def link fvwmModConf Macro +hi def link fvwmRGBValue Constant +hi def link fvwmString String +hi def link fvwmBackslash SpecialChar + + +" +" Highlighting groups for fvwm1 specific items +" +hi def link fvwmExec fvwmKeyword +hi def link fvwmKey fvwmKeyword +hi def link fvwmModule fvwmKeyword +hi def link fvwmFunction Function + +" +" Highlighting groups for fvwm2 specific items +" +hi def link fvwmSpecialFn Type +hi def link fvwmCursorStyle fvwmStyleNames +hi def link fvwmStyleNames Identifier +hi def link fvwmMStyleNames fvwmStyleNames +hi def link fvwmCSNames fvwmStyleNames +hi def link fvwmGradient fvwmStyleNames +hi def link fvwmCondNames fvwmStyleNames +hi def link fvwmTCNames fvwmStyleNames +hi def link fvwmTRNames fvwmStyleNames +hi def link fvwmWLOpts fvwmStyleNames + +hi def link fvwmBNum Number +hi def link fvwmBState Type +hi def link fvwmBStyleNames fvwmStyleNames +hi def link fvwmBStyleFlags Special + +hi def link fvwmBStateTF Constant +hi def link fvwmBStateNames fvwmStyleNames + +hi def link fvwmBdState fvwmBState +hi def link fvwmBdStyNames fvwmStyleNames +hi def link fvwmBdStyFlags fvwmBStyleFlags + +hi def link fvwmTState fvwmBState +hi def link fvwmTStyleNames fvwmStyleNames +hi def link fvwmMPmapNames fvwmBStyleFlags +hi def link fvwmTStyleFlags fvwmBStyleFlags + +hi def link fvwmDirection fvwmBStyleFlags + +hi def link fvwmKeyWin Constant +hi def link fvwmMouseWin fvwmKeyWin +hi def link fvwmKeyName Special +hi def link fvwmKeyContext fvwmKeyName +hi def link fvwmKeyMods fvwmKeyName +hi def link fvwmMouseButton fvwmKeyName + +hi def link fvwmMenuString String +hi def link fvwmIcon Type +hi def link fvwmShortcutKey SpecialChar + +hi def link fvwmModuleName Function + +let b:current_syntax = "fvwm" + +let &cpo = s:keepcpo +unlet s:keepcpo -- cgit v1.2.3