diff options
Diffstat (limited to '3rd/vim/syntax/fluxkeys.vim')
-rw-r--r-- | 3rd/vim/syntax/fluxkeys.vim | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/3rd/vim/syntax/fluxkeys.vim b/3rd/vim/syntax/fluxkeys.vim new file mode 100644 index 0000000..3175b56 --- /dev/null +++ b/3rd/vim/syntax/fluxkeys.vim | |||
@@ -0,0 +1,133 @@ | |||
1 | " File Name: fluxkeys.vim | ||
2 | " Maintainer: Mathias Gumz <akira at fluxbox dot org> | ||
3 | " Original Date: 2004-01-27 | ||
4 | " Changelog: | ||
5 | " * 2010-09-19 update from Segaja | ||
6 | " * 2009-11-01 update to current fluxbox syntax (thanx to Harry Bullen) | ||
7 | " * 2005-06-24 | ||
8 | " Description: fluxbox key syntax | ||
9 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
10 | |||
11 | " quit when a syntax file was already loaded | ||
12 | if exists("b:current_syntax") | ||
13 | finish | ||
14 | endif | ||
15 | |||
16 | syntax case ignore | ||
17 | |||
18 | " COMMANDS | ||
19 | |||
20 | " Mouse Commands | ||
21 | syntax keyword fbActionNames StartMoving StartResizing StartTabbing contained | ||
22 | |||
23 | " Window Commands | ||
24 | syntax keyword fbActionNames Minimize MinimizeWindow Iconify contained | ||
25 | syntax keyword fbActionNames Maximize MaximizeWindow MaximizeHorizontal MaximizeVertical Fullscreen contained | ||
26 | syntax keyword fbActionNames Raise Lower RaiseLayer LowerLayer SetLayer contained | ||
27 | syntax keyword fbActionNames Close Kill KillWindow contained | ||
28 | syntax keyword fbActionNames Shade ShadeWindow ShadeOn ShadeOff contained | ||
29 | syntax keyword fbActionNames Stick StickWindow contained | ||
30 | syntax keyword fbActionNames SetDecor ToggleDecor contained | ||
31 | syntax keyword fbActionNames NextTab PrevTab Tab MoveTabRight MoveTabLeft DetachClient contained | ||
32 | syntax keyword fbActionNames ResizeTo Resize ResizeHorizontal ResizeVertical contained | ||
33 | syntax keyword fbActionNames MoveTo Move MoveRight MoveLeft MoveUp MoveDown contained | ||
34 | syntax keyword fbActionNames TakeToWorkspace SendToWorkspace contained | ||
35 | syntax keyword fbActionNames TakeToNextWorkspace TakeToPrevWorkspace SendToNextWorkspace SendToPrevWorkspace contained | ||
36 | syntax keyword fbActionNames SetAlpha contained | ||
37 | syntax keyword fbActionNames SetHead SendToNexthead SendToPrevHead contained | ||
38 | syntax keyword fbActionNames ActivateTab contained | ||
39 | |||
40 | " Workspace Commands | ||
41 | syntax keyword fbActionNames AddWorkspace RemoveLastWorkspace contained | ||
42 | syntax keyword fbActionNames NextWorkspace PrevWorkspace RightWorkspace LeftWorkspace Workspace contained | ||
43 | syntax keyword fbActionNames NextWindow PrevWindow Next\Group PrevGroup GotoWindow contained | ||
44 | syntax keyword fbActionNames Activate Focus Attach FocusLeft FocusRight FocusUp FocusDown contained | ||
45 | syntax keyword fbActionNames ArrangeWindows ShowDesktop Deiconify CloseAllWindows contained | ||
46 | syntax keyword fbActionNames SetWorkspaceName SetWorkspaceNameDialog contained | ||
47 | |||
48 | " Menu Commands | ||
49 | syntax keyword fbActionNames RootMenu WorkspaceMenu WindowMenu ClientMenu CustomMenu HideMenus contained | ||
50 | |||
51 | " Window Manager Commands | ||
52 | syntax keyword fbActionNames Restart Quit Exit contained | ||
53 | syntax keyword fbActionNames Reconfig Reconfigure contained | ||
54 | syntax keyword fbActionNames SetStyle ReloadStyle contained | ||
55 | syntax keyword fbActionNames ExecCommand Exec Execute CommandDialog contained | ||
56 | syntax keyword fbActionNames SetEnv Export contained | ||
57 | syntax keyword fbActionNames SetResourceValue SetResourceValueDialog contained | ||
58 | |||
59 | " Special Commands | ||
60 | syntax keyword fbActionNames MacroCmd Delay ToggleCmd contained | ||
61 | syntax keyword fbActionNames BindKey KeyMode contained | ||
62 | syntax keyword fbActionNames ForEach Map contained | ||
63 | syntax keyword fbActionNames If Cond contained | ||
64 | |||
65 | |||
66 | " MODIFIERS | ||
67 | syntax keyword fbModifierNames Control Shift Double contained | ||
68 | syntax keyword fbModifierNames Mod1 Mod2 Mod3 Mod4 Mod5 contained | ||
69 | syntax keyword fbModifierNames None contained | ||
70 | syntax keyword fbModifierNames OnDesktop OnToolbar OnTitlebar OnWindow OnWindowBorder OnLeftGrip OnRightGrip contained | ||
71 | |||
72 | " reference corners | ||
73 | syntax keyword fbParameterNames UpperLeft Upper UpperRight contained | ||
74 | syntax keyword fbParameterNames Left Right contained | ||
75 | syntax keyword fbParameterNames LowerLeft Lower LowerRight contained | ||
76 | " deiconfiy | ||
77 | syntax keyword fbParameterNames LastWorkspace Last All AllWorkspace OriginQuiet contained | ||
78 | |||
79 | " parameter numbers | ||
80 | syntax match fbParameterNumber /\([+-]\)*\d\+/ contained | ||
81 | |||
82 | |||
83 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
84 | " match the right parts | ||
85 | syntax match fbParameter /.*/ contained contains=fbParameterNames,fbParameterNumber | ||
86 | |||
87 | " anything with an unknown ActionName is colored Error | ||
88 | syntax match fbAction /\w\+/ contained contains=fbActionNames nextgroup=fbParameter | ||
89 | syntax match fbExecAction /Exec\(ute\|Command\)*\s\+.*$/ contained contains=fbActionNames | ||
90 | |||
91 | " stuff for macro and toggle magic | ||
92 | syntax match fbMTParameter /.\{-\}}/ contained contains=fbParameterNames,fbParameterNumber | ||
93 | syntax match fbMTAction /\w\+/ contained contains=fbActionNames nextgroup=fbMTParameter | ||
94 | syntax region fbMTExecAction start=/{Exec\(ute\|Command\)*\s\+/hs=s+1 end=/.\{-}}/he=e-1 contained contains=fbActionNames oneline | ||
95 | |||
96 | " macro magic | ||
97 | syntax region fbMacro start=/{/ end=/.\{-}}/ contained contains=fbMTExecAction,fbMTAction oneline nextgroup=fbMacro skipwhite | ||
98 | syntax match fbMacroStart /MacroCmd\s\+/ contained contains=fbActionNames nextgroup=fbMacro | ||
99 | |||
100 | " toggle magic | ||
101 | syntax match fbToggleError /.$/ contained skipwhite | ||
102 | syntax match fbToggle2 /{.\{-}}/ contained contains=fbMTExecAction,fbMTAction nextgroup=fbToggleError skipwhite | ||
103 | syntax match fbToggle1 /{.\{-}}/ contained contains=fbMTExecAction,fbMTAction nextgroup=fbToggle2 skipwhite | ||
104 | syntax match fbToggleStart /ToggleCmd\s\+/ contained contains=fbActionNames nextgroup=fbToggle1 | ||
105 | |||
106 | " anything but a valid modifier is colored Error | ||
107 | syntax match fbKeyStart /^\w\+/ contained contains=fbModifierNames | ||
108 | |||
109 | " anything but a comment or a valid key line is colored Error | ||
110 | syntax match fbNoKeyline /.\+$/ display skipwhite | ||
111 | syntax region fbKeys start=/\w\+/ end=/.\{-}:/he=e-1 contains=fbKeyStart,fbModifierNames nextgroup=fbMacroStart,fbToggleStart,fbExecAction,fbAction oneline | ||
112 | syntax match fbComment /[#!].*$/ display | ||
113 | |||
114 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
115 | " coloring | ||
116 | highlight link fbNoKeyline Error | ||
117 | highlight link fbAction Error | ||
118 | highlight link fbKeyStart Error | ||
119 | highlight link fbToggleError Error | ||
120 | |||
121 | highlight link fbComment Comment | ||
122 | highlight link fbKeys Number | ||
123 | highlight link fbExecAction String | ||
124 | highlight link fbMTExecAction String | ||
125 | highlight link fbActionNames Type | ||
126 | highlight link fbModifierNames Macro | ||
127 | highlight link fbParameter Number | ||
128 | highlight link fbParameterNames Function | ||
129 | highlight link fbParameterNumber Conditional | ||
130 | |||
131 | syntax sync fromstart | ||
132 | |||
133 | let b:current_syntax = 'fluxkeys' | ||