xref: /minix3/external/bsd/tmux/dist/examples/tmux.vim (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1" Vim syntax file
2" Language: tmux(1) configuration file
3" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net>
4" Last Change: Date: 2010-07-27 18:29:07
5" License: This file is placed in the public domain.
6"
7" To install this file:
8"
9" - Drop the file in the syntax directory into runtimepath (such as
10"  ~/.vim/syntax/tmux.vim).
11" - Make the filetype recognisable by adding the following to filetype.vim
12"   (~/.vim/filetype.vim):
13"
14"	augroup filetypedetect
15"		au BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
16"	augroup END
17"
18" - Switch on syntax highlighting by adding "syntax enable" to .vimrc.
19"
20
21if version < 600
22	syntax clear
23elseif exists("b:current_syntax")
24	finish
25endif
26
27setlocal iskeyword+=-
28syntax case match
29
30syn keyword tmuxAction	any current none
31syn keyword tmuxBoolean	off on
32
33syn keyword tmuxCmds
34	\ attach[-session]
35	\ bind[-key]
36	\ break-pane
37	\ breakp
38	\ capture-pane
39	\ capturep
40	\ choose-buffer
41	\ choose-client
42	\ choose-list
43	\ choose-session
44	\ choose-tree
45	\ choose-window
46	\ clear-history
47	\ clearhist
48	\ clock-mode
49	\ command-prompt
50	\ confirm[-before]
51	\ copy-mode
52	\ delete-buffer
53	\ deleteb
54	\ detach[-client]
55	\ display[-message]
56	\ display-panes
57	\ displayp
58	\ find-window
59	\ findw
60	\ has[-session]
61	\ if[-shell]
62	\ join-pane
63	\ joinp
64	\ kill-pane
65	\ killp
66	\ kill-server
67	\ kill-session
68	\ kill-window
69	\ killw
70	\ last-pane
71	\ lastp
72	\ last[-window]
73	\ link-window
74	\ linkw
75	\ list-buffers
76	\ lsb
77	\ list-clients
78	\ lsc
79	\ list-commands
80	\ lscm
81	\ list-keys
82	\ lsk
83	\ list-panes
84	\ lsp
85	\ list-sessions
86	\ ls
87	\ list-windows
88	\ lsw
89	\ load-buffer
90	\ loadb
91	\ lock-client
92	\ lockc
93	\ lock[-server]
94	\ lock-session
95	\ locks
96	\ move-pane
97	\ movep
98	\ move-window
99	\ movew
100	\ new[-session]
101	\ next-layout
102	\ nextl
103	\ next[-window]
104	\ paste-buffer
105	\ pasteb
106	\ pipe-pane
107	\ pipep
108	\ previous-layout
109	\ prevl
110	\ prev[ious-window]
111	\ refresh[-client]
112	\ rename[-session]
113	\ rename-window
114	\ renamew
115	\ resize-pane
116	\ resizep
117	\ respawn-pane
118	\ respawnp
119	\ respawn-window
120	\ respawnw
121	\ rotate-window
122	\ rotatew
123	\ run[-shell]
124	\ save-buffer
125	\ saveb
126	\ select-layout
127	\ selectl
128	\ select-pane
129	\ selectp
130	\ select-window
131	\ selectw
132	\ send[-keys]
133	\ send-prefix
134	\ server-info
135	\ info
136	\ set-buffer
137	\ setb
138	\ set-environment
139	\ setenv
140	\ set[-option]
141	\ set-window-option
142	\ setw
143	\ show-buffer
144	\ showb
145	\ show-environment
146	\ showenv
147	\ show-messages
148	\ showmsgs
149	\ show[-options]
150	\ show-window-options
151	\ showw
152	\ source[-file]
153	\ split-window
154	\ splitw
155	\ start[-server]
156	\ suspend-client
157	\ suspendc
158	\ swap-pane
159	\ swapp
160	\ swap-window
161	\ swapw
162	\ switch-client
163	\ switchc
164	\ unbind[-key]
165	\ unlink-window
166	\ unlinkw
167	\ wait[-for]
168
169syn keyword tmuxOptsSet
170	\ assume-paste-time
171	\ base-index
172	\ bell-action
173	\ bell-on-alert
174	\ buffer-limit
175	\ default-command
176	\ default-shell
177	\ default-terminal
178	\ destroy-unattached
179	\ detach-on-destroy
180	\ display-panes-active-colour
181	\ display-panes-colour
182	\ display-panes-time
183	\ display-time
184	\ escape-time
185	\ exit-unattached
186	\ focus-events
187	\ history-limit
188	\ lock-after-time
189	\ lock-command
190	\ lock-server
191	\ message-command-style
192	\ message-limit
193	\ message-style
194	\ mouse-resize-pane
195	\ mouse-select-pane
196	\ mouse-select-window
197	\ mouse-utf8
198	\ pane-active-border-style
199	\ pane-border-style
200	\ prefix
201	\ prefix2
202	\ quiet
203	\ renumber-windows
204	\ repeat-time
205	\ set-clipboard
206	\ set-remain-on-exit
207	\ set-titles
208	\ set-titles-string
209	\ status
210	\ status-interval
211	\ status-justify
212	\ status-keys
213	\ status-left
214	\ status-left-length
215	\ status-left-style
216	\ status-position
217	\ status-right
218	\ status-right-length
219	\ status-utf8
220	\ staus-right-style
221	\ terminal-overrides
222	\ update-environment
223	\ visual-activity
224	\ visual-bell
225	\ visual-content
226	\ visual-silence
227	\ word-separators
228
229syn keyword tmuxOptsSetw
230	\ aggressive-resize
231	\ allow-rename
232	\ alternate-screen
233	\ automatic-rename
234	\ c0-change-interval
235	\ c0-change-trigger
236	\ clock-mode-colour
237	\ clock-mode-style
238	\ force-height
239	\ force-width
240	\ main-pane-height
241	\ main-pane-width
242	\ mode-keys
243	\ mode-mouse
244	\ mode-style
245	\ monitor-activity
246	\ monitor-content
247	\ monitor-silence
248	\ other-pane-height
249	\ other-pane-width
250	\ pane-base-index
251	\ remain-on-exit
252	\ synchronize-panes
253	\ utf8
254	\ window-status-activity-style
255	\ window-status-bell-style
256	\ window-status-content-style
257	\ window-status-current-format
258	\ window-status-current-style
259	\ window-status-format
260	\ window-status-last-style
261	\ window-status-separator
262	\ window-status-style
263	\ wrap-search
264	\ xterm-keys
265
266syn keyword tmuxTodo FIXME NOTE TODO XXX contained
267
268syn match tmuxKey		/\(C-\|M-\|\^\)\+\S\+/	display
269syn match tmuxNumber 		/\d\+/			display
270syn match tmuxOptions		/\s-\a\+/		display
271syn match tmuxVariable		/\w\+=/			display
272syn match tmuxVariableExpansion	/\${\=\w\+}\=/		display
273
274syn region tmuxComment	start=/#/ end=/$/ contains=tmuxTodo display oneline
275syn region tmuxString	start=/"/ end=/"/ display oneline
276syn region tmuxString	start=/'/ end=/'/ display oneline
277
278hi def link tmuxAction			Boolean
279hi def link tmuxBoolean			Boolean
280hi def link tmuxCmds			Keyword
281hi def link tmuxComment			Comment
282hi def link tmuxKey			Special
283hi def link tmuxNumber			Number
284hi def link tmuxOptions			Identifier
285hi def link tmuxOptsSet			Function
286hi def link tmuxOptsSetw		Function
287hi def link tmuxString			String
288hi def link tmuxTodo			Todo
289hi def link tmuxVariable		Constant
290hi def link tmuxVariableExpansion	Constant
291
292let b:current_syntax = "tmux"
293