annotate runtime/syntax/tmux.vim @ 11482:e691ebe6558e v8.0.0624

patch 8.0.0624: warning for unused variable in tiny build commit https://github.com/vim/vim/commit/6c95fbc9ae64f3a7619070e830f0c35aa4f0ada9 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 5 17:53:37 2017 +0200 patch 8.0.0624: warning for unused variable in tiny build Problem: Warning for unused variable in tiny build. (Tony Mechelynck) Solution: Add an #ifdef.
author Christian Brabandt <cb@256bit.org>
date Mon, 05 Jun 2017 18:00:04 +0200
parents d0a20101ecb2
children 665fe1f419b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Language: tmux(1) configuration file
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Version: 2.3 (git-14dc2ac)
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " URL: https://github.com/ericpruitt/tmux.vim/
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
7 if exists("b:current_syntax")
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 finish
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 endif
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
11 " Explicitly change compatiblity options to Vim's defaults because this file
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
12 " uses line continuations.
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
13 let s:original_cpo = &cpo
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 set cpo&vim
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
16 let b:current_syntax = "tmux"
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 setlocal iskeyword+=-
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 syntax case match
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 syn keyword tmuxAction none any current other
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 syn keyword tmuxBoolean off on
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 syn keyword tmuxTodo FIXME NOTE TODO XXX contained
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 syn match tmuxColour /\<colour[0-9]\+/ display
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 syn match tmuxNumber /\d\+/ display
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 syn match tmuxFlags /\s-\a\+/ display
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 syn match tmuxVariable /\w\+=/ display
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 syn region tmuxString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 " TODO: Figure out how escaping works inside of #(...) and #{...} blocks.
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ contained keepend
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 hi def link tmuxFormatString Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 hi def link tmuxAction Boolean
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 hi def link tmuxBoolean Boolean
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 hi def link tmuxCommands Keyword
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 hi def link tmuxComment Comment
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 hi def link tmuxKey Special
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 hi def link tmuxNumber Number
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 hi def link tmuxFlags Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 hi def link tmuxOptions Function
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 hi def link tmuxString String
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 hi def link tmuxTodo Todo
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 hi def link tmuxVariable Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 hi def link tmuxVariableExpansion Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 " Make the foreground of colourXXX keywords match the color they represent.
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 " Darker colors have their background set to white.
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 for s:i in range(0, 255)
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none"
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display"
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 \ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 endfor
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 syn keyword tmuxOptions
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 \ buffer-limit command-alias default-terminal escape-time exit-unattached
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 \ focus-events history-file message-limit set-clipboard terminal-overrides
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 \ assume-paste-time base-index bell-action bell-on-alert default-command
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 \ default-shell destroy-unattached detach-on-destroy
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 \ display-panes-active-colour display-panes-colour display-panes-time
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 \ display-time history-limit key-table lock-after-time lock-command
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 \ message-attr message-bg message-command-attr message-command-bg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 \ message-command-fg message-command-style message-fg message-style mouse
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 \ prefix prefix2 renumber-windows repeat-time set-titles set-titles-string
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 \ status status-attr status-bg status-fg status-interval status-justify
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 \ status-keys status-left status-left-attr status-left-bg status-left-fg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 \ status-left-length status-left-style status-position status-right
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 \ status-right-attr status-right-bg status-right-fg status-right-length
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 \ status-right-style status-style update-environment visual-activity
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 \ visual-bell visual-silence word-separators aggressive-resize allow-rename
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 \ alternate-screen automatic-rename automatic-rename-format
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 \ clock-mode-colour clock-mode-style force-height force-width
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 \ main-pane-height main-pane-width mode-attr mode-bg mode-fg mode-keys
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 \ mode-style monitor-activity monitor-silence other-pane-height
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 \ other-pane-width pane-active-border-bg pane-active-border-fg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 \ pane-active-border-style pane-base-index pane-border-bg pane-border-fg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 \ pane-border-format pane-border-status pane-border-style remain-on-exit
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 \ synchronize-panes window-active-style window-style
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 \ window-status-activity-attr window-status-activity-bg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 \ window-status-activity-fg window-status-activity-style window-status-attr
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 \ window-status-bell-attr window-status-bell-bg window-status-bell-fg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 \ window-status-bell-style window-status-bg window-status-current-attr
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 \ window-status-current-bg window-status-current-fg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 \ window-status-current-format window-status-current-style window-status-fg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 \ window-status-format window-status-last-attr window-status-last-bg
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 \ window-status-last-fg window-status-last-style window-status-separator
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96 \ window-status-style wrap-search xterm-keys
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 syn keyword tmuxCommands
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99 \ attach-session attach bind-key bind break-pane breakp capture-pane
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 \ capturep clear-history clearhist choose-buffer choose-client choose-tree
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101 \ choose-session choose-window command-prompt confirm-before confirm
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 \ copy-mode clock-mode detach-client detach suspend-client suspendc
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103 \ display-message display display-panes displayp find-window findw if-shell
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104 \ if join-pane joinp move-pane movep kill-pane killp kill-server
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 \ start-server start kill-session kill-window killw unlink-window unlinkw
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 \ list-buffers lsb list-clients lsc list-keys lsk list-commands lscm
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 \ list-panes lsp list-sessions ls list-windows lsw load-buffer loadb
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108 \ lock-server lock lock-session locks lock-client lockc move-window movew
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109 \ link-window linkw new-session new has-session has new-window neww
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 \ paste-buffer pasteb pipe-pane pipep refresh-client refresh rename-session
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 \ rename rename-window renamew resize-pane resizep respawn-pane respawnp
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 \ respawn-window respawnw rotate-window rotatew run-shell run save-buffer
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113 \ saveb show-buffer showb select-layout selectl next-layout nextl
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 \ previous-layout prevl select-pane selectp last-pane lastp select-window
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
115 \ selectw next-window next previous-window prev last-window last send-keys
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 \ send send-prefix set-buffer setb delete-buffer deleteb set-environment
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
117 \ setenv set-hook show-hooks set-option set set-window-option setw
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118 \ show-environment showenv show-messages showmsgs show-options show
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119 \ show-window-options showw source-file source split-window splitw swap-pane
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120 \ swapp swap-window swapw switch-client switchc unbind-key unbind wait-for
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121 \ wait
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
122
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
123 let &cpo = s:original_cpo
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
124 unlet! s:original_cpo s:bg s:i