11062
|
1 " Language: tmux(1) configuration file
|
28246
|
2 " Version: 3.3-rc (git-964deae4)
|
11062
|
3 " URL: https://github.com/ericpruitt/tmux.vim/
|
|
4 " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
|
|
5 " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
|
|
6
|
11160
|
7 if exists("b:current_syntax")
|
11062
|
8 finish
|
|
9 endif
|
|
10
|
25773
|
11 " Explicitly change compatibility options to Vim's defaults because this file
|
11160
|
12 " uses line continuations.
|
|
13 let s:original_cpo = &cpo
|
11062
|
14 set cpo&vim
|
|
15
|
11160
|
16 let b:current_syntax = "tmux"
|
14006
|
17 syntax iskeyword @,48-57,_,192-255,-
|
11062
|
18 syntax case match
|
|
19
|
|
20 syn keyword tmuxAction none any current other
|
28246
|
21 syn keyword tmuxBoolean off on yes no
|
11062
|
22
|
|
23 syn keyword tmuxTodo FIXME NOTE TODO XXX contained
|
|
24
|
28246
|
25 syn match tmuxColour /\<colou\?r[0-9]\+\>/ display
|
11062
|
26 syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
|
14006
|
27 syn match tmuxNumber /\<\d\+\>/ display
|
11062
|
28 syn match tmuxFlags /\s-\a\+/ display
|
28246
|
29 syn match tmuxVariableExpansion /\$\({[A-Za-z_]\w*}\|[A-Za-z_]\w*\)/ display
|
|
30 syn match tmuxControl /^\s*%\(if\|elif\|else\|endif\)\>/
|
|
31 syn match tmuxEscape /\\\(u\x\{4\}\|U\x\{8\}\|\o\{3\}\|[\\ernt$]\)/ display
|
11062
|
32
|
25973
|
33 syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo,@Spell
|
11062
|
34
|
28246
|
35 syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,tmuxEscape,tmuxVariableExpansion,@Spell
|
|
36 syn region tmuxUninterpolatedString start=+'+ skip=+\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
|
11062
|
37
|
|
38 " TODO: Figure out how escaping works inside of #(...) and #{...} blocks.
|
|
39 syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend
|
25973
|
40 syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend
|
11062
|
41 syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend
|
|
42
|
28246
|
43 " At the time of this writing, the latest tmux release will parse a line
|
|
44 " reading "abc=xyz set-option ..." as an assignment followed by a command
|
|
45 " hence the presence of "\s" in the "end" argument.
|
|
46 syn region tmuxAssignment matchgroup=tmuxVariable start=/^\s*[A-Za-z_]\w*=\@=/ skip=/\\$\|\\\s/ end=/\s\|$/ contains=tmuxString,tmuxUninterpolatedString,tmuxVariableExpansion,tmuxControl,tmuxEscape
|
|
47
|
11062
|
48 hi def link tmuxFormatString Identifier
|
|
49 hi def link tmuxAction Boolean
|
|
50 hi def link tmuxBoolean Boolean
|
|
51 hi def link tmuxCommands Keyword
|
28246
|
52 hi def link tmuxControl PreCondit
|
11062
|
53 hi def link tmuxComment Comment
|
28246
|
54 hi def link tmuxEscape Special
|
|
55 hi def link tmuxEscapeUnquoted Special
|
11062
|
56 hi def link tmuxKey Special
|
|
57 hi def link tmuxNumber Number
|
|
58 hi def link tmuxFlags Identifier
|
|
59 hi def link tmuxOptions Function
|
|
60 hi def link tmuxString String
|
|
61 hi def link tmuxTodo Todo
|
28246
|
62 hi def link tmuxUninterpolatedString
|
|
63 \ String
|
11062
|
64 hi def link tmuxVariable Identifier
|
|
65 hi def link tmuxVariableExpansion Identifier
|
|
66
|
25973
|
67 " Make the foreground of colourXXX keywords match the color they represent
|
|
68 " when g:tmux_syntax_colors is unset or set to a non-zero value.
|
11062
|
69 " Darker colors have their background set to white.
|
25973
|
70 if get(g:, "tmux_syntax_colors", 1)
|
|
71 for s:i in range(0, 255)
|
|
72 let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none"
|
28246
|
73 exec "syn match tmuxColour" . s:i . " /\\<colou\\?r" . s:i . "\\>/ display"
|
25973
|
74 \ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
|
|
75 endfor
|
|
76 endif
|
11062
|
77
|
|
78 syn keyword tmuxOptions
|
28246
|
79 \ activity-action after-bind-key after-capture-pane after-copy-mode
|
|
80 \ after-display-message after-display-panes after-kill-pane
|
|
81 \ after-list-buffers after-list-clients after-list-keys after-list-panes
|
|
82 \ after-list-sessions after-list-windows after-load-buffer after-lock-server
|
|
83 \ after-new-session after-new-window after-paste-buffer after-pipe-pane
|
|
84 \ after-queue after-refresh-client after-rename-session after-rename-window
|
|
85 \ after-resize-pane after-resize-window after-save-buffer
|
|
86 \ after-select-layout after-select-pane after-select-window after-send-keys
|
|
87 \ after-set-buffer after-set-environment after-set-hook after-set-option
|
|
88 \ after-show-environment after-show-messages after-show-options
|
|
89 \ after-split-window after-unbind-key aggressive-resize alert-activity
|
|
90 \ alert-bell alert-silence allow-passthrough allow-rename alternate-screen
|
|
91 \ assume-paste-time automatic-rename automatic-rename-format backspace
|
|
92 \ base-index bell-action buffer-limit client-active client-attached
|
|
93 \ client-detached client-focus-in client-focus-out client-resized
|
|
94 \ client-session-changed clock-mode-colour clock-mode-style command-alias
|
|
95 \ copy-command copy-mode-current-match-style copy-mode-mark-style
|
|
96 \ copy-mode-match-style cursor-colour cursor-style default-command
|
|
97 \ default-shell default-size default-terminal destroy-unattached
|
18750
|
98 \ detach-on-destroy display-panes-active-colour display-panes-colour
|
28246
|
99 \ display-panes-time display-time editor escape-time exit-empty
|
|
100 \ exit-unattached extended-keys fill-character focus-events history-file
|
|
101 \ history-limit key-table lock-after-time lock-command main-pane-height
|
|
102 \ main-pane-width message-command-style message-limit message-style
|
|
103 \ mode-keys mode-style monitor-activity monitor-bell monitor-silence mouse
|
|
104 \ other-pane-height other-pane-width pane-active-border-style
|
|
105 \ pane-base-index pane-border-format pane-border-indicators
|
|
106 \ pane-border-lines pane-border-status pane-border-style pane-colours
|
|
107 \ pane-died pane-exited pane-focus-in pane-focus-out pane-mode-changed
|
|
108 \ pane-set-clipboard pane-title-changed popup-border-lines
|
|
109 \ popup-border-style popup-style prefix prefix2 prompt-history-limit
|
|
110 \ remain-on-exit remain-on-exit-format renumber-windows repeat-time
|
|
111 \ scroll-on-clear session-closed session-created session-renamed
|
|
112 \ session-window-changed set-clipboard set-titles set-titles-string
|
|
113 \ silence-action status status-bg status-fg status-format status-interval
|
|
114 \ status-justify status-keys status-left status-left-length
|
|
115 \ status-left-style status-position status-right status-right-length
|
|
116 \ status-right-style status-style synchronize-panes terminal-features
|
|
117 \ terminal-overrides update-environment user-keys visual-activity
|
|
118 \ visual-bell visual-silence window-active-style window-layout-changed
|
|
119 \ window-linked window-pane-changed window-renamed window-resized
|
25973
|
120 \ window-size window-status-activity-style window-status-bell-style
|
18750
|
121 \ window-status-current-format window-status-current-style
|
|
122 \ window-status-format window-status-last-style window-status-separator
|
28246
|
123 \ window-status-style window-style window-unlinked word-separators
|
|
124 \ wrap-search xterm-keys
|
11062
|
125
|
|
126 syn keyword tmuxCommands
|
14006
|
127 \ attach attach-session bind bind-key break-pane breakp capture-pane
|
28246
|
128 \ capturep choose-buffer choose-client choose-session choose-tree
|
|
129 \ choose-window clear-history clear-prompt-history clearhist clearphist
|
25973
|
130 \ clock-mode command-prompt confirm confirm-before copy-mode customize-mode
|
28246
|
131 \ delete-buffer deleteb detach detach-client display display-menu
|
|
132 \ display-message display-panes display-popup displayp find-window findw has
|
|
133 \ has-session if if-shell info join-pane joinp kill-pane kill-server
|
|
134 \ kill-session kill-window killp killw last last-pane last-window lastp
|
25973
|
135 \ link-window linkw list-buffers list-clients list-commands list-keys
|
|
136 \ list-panes list-sessions list-windows load-buffer loadb lock lock-client
|
28246
|
137 \ lock-server lock-session lockc locks ls lsb lsc lscm lsk lsp lsw menu
|
|
138 \ move-pane move-window movep movew new new-session new-window neww next
|
|
139 \ next-layout next-window nextl paste-buffer pasteb pipe-pane pipep popup
|
|
140 \ prev previous-layout previous-window prevl refresh refresh-client rename
|
|
141 \ rename-session rename-window renamew resize-pane resize-window resizep
|
|
142 \ resizew respawn-pane respawn-window respawnp respawnw rotate-window
|
|
143 \ rotatew run run-shell save-buffer saveb select-layout select-pane
|
|
144 \ select-window selectl selectp selectw send send-keys send-prefix
|
|
145 \ server-info set set-buffer set-environment set-hook set-option
|
16808
|
146 \ set-window-option setb setenv setw show show-buffer show-environment
|
25973
|
147 \ show-hooks show-messages show-options show-prompt-history
|
|
148 \ show-window-options showb showenv showmsgs showphist showw source
|
28246
|
149 \ source-file split-pane split-window splitp splitw start start-server
|
|
150 \ suspend-client suspendc swap-pane swap-window swapp swapw switch-client
|
|
151 \ switchc unbind unbind-key unlink-window unlinkw wait wait-for
|
11062
|
152
|
11160
|
153 let &cpo = s:original_cpo
|
|
154 unlet! s:original_cpo s:bg s:i
|