annotate runtime/syntax/tmux.vim @ 27745:94b70a7a4d94

Added tag v8.2.4398 for changeset 515ce8e07bf243fc31df10af46227a8fe0079674
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Feb 2022 13:45:05 +0100
parents 3b34837f4538
children e3d6184b89fa
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
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
2 " Version: 3.2a (git-44ada9cd)
11062
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
25773
11b656e74444 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 18750
diff changeset
11 " Explicitly change compatibility options to Vim's defaults because this file
11160
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"
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
17 syntax iskeyword @,48-57,_,192-255,-
11062
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
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
27 syn match tmuxNumber /\<\d\+\>/ display
11062
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
18750
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
31 syn match tmuxControl /%\(if\|elif\|else\|endif\)/
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
33 syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo,@Spell
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
35 syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,@Spell
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
36 syn region tmuxString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 " TODO: Figure out how escaping works inside of #(...) and #{...} blocks.
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
40 syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 hi def link tmuxFormatString Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 hi def link tmuxAction Boolean
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 hi def link tmuxBoolean Boolean
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 hi def link tmuxCommands Keyword
18750
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
47 hi def link tmuxControl Keyword
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 hi def link tmuxComment Comment
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 hi def link tmuxKey Special
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 hi def link tmuxNumber Number
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 hi def link tmuxFlags Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 hi def link tmuxOptions Function
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 hi def link tmuxString String
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 hi def link tmuxTodo Todo
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 hi def link tmuxVariable Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 hi def link tmuxVariableExpansion Identifier
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
58 " Make the foreground of colourXXX keywords match the color they represent
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
59 " when g:tmux_syntax_colors is unset or set to a non-zero value.
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 " Darker colors have their background set to white.
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
61 if get(g:, "tmux_syntax_colors", 1)
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
62 for s:i in range(0, 255)
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
63 let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none"
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
64 exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display"
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
65 \ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
66 endfor
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
67 endif
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 syn keyword tmuxOptions
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
70 \ backspace buffer-limit command-alias copy-command default-terminal editor
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
71 \ escape-time exit-empty activity-action assume-paste-time base-index
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
72 \ bell-action default-command default-shell default-size destroy-unattached
18750
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
73 \ detach-on-destroy display-panes-active-colour display-panes-colour
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
74 \ display-panes-time display-time exit-unattached extended-keys focus-events
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
75 \ history-file history-limit key-table lock-after-time lock-command
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
76 \ message-command-style message-limit message-style aggressive-resize
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
77 \ allow-rename alternate-screen automatic-rename automatic-rename-format
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
78 \ clock-mode-colour clock-mode-style copy-mode-current-match-style
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
79 \ copy-mode-mark-style copy-mode-match-style main-pane-height
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
80 \ main-pane-width mode-keys mode-style monitor-activity monitor-bell
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
81 \ monitor-silence mouse other-pane-height other-pane-width
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
82 \ pane-active-border-style pane-base-index pane-border-format
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
83 \ pane-border-lines pane-border-status pane-border-style pane-colours prefix
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
84 \ prefix2 prompt-history-limit remain-on-exit renumber-windows repeat-time
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
85 \ set-clipboard set-titles set-titles-string silence-action status status-bg
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
86 \ status-fg status-format status-interval status-justify status-keys
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
87 \ status-left status-left-length status-left-style status-position
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
88 \ status-right status-right-length status-right-style status-style
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
89 \ synchronize-panes terminal-features terminal-overrides update-environment
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
90 \ user-keys visual-activity visual-bell visual-silence window-active-style
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
91 \ window-size window-status-activity-style window-status-bell-style
18750
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
92 \ window-status-current-format window-status-current-style
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
93 \ window-status-format window-status-last-style window-status-separator
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
94 \ window-status-style window-style word-separators wrap-search
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96 syn keyword tmuxCommands
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
97 \ attach attach-session bind bind-key break-pane breakp capture-pane
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
98 \ capturep choose-buffer choose-client choose-tree clear-history clearhist
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
99 \ clock-mode command-prompt confirm confirm-before copy-mode customize-mode
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
100 \ detach detach-client display display-menu display-message display-panes
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
101 \ display-popup displayp find-window findw if if-shell join-pane joinp
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
102 \ kill-pane kill-server kill-session kill-window killp has has-session killw
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
103 \ link-window linkw list-buffers list-clients list-commands list-keys
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
104 \ list-panes list-sessions list-windows load-buffer loadb lock lock-client
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
105 \ lock-server lock-session lockc last-pane lastp locks ls last last-window
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
106 \ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
107 \ clear-prompt-history clearphist movep movew new new-session new-window
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
108 \ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
109 \ pipep popup prev previous-layout previous-window prevl refresh
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
110 \ refresh-client rename rename-session rename-window renamew resize-pane
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
111 \ resize-window resizep resizew respawn-pane respawn-window respawnp
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
112 \ respawnw rotate-window rotatew run run-shell save-buffer saveb
16808
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14006
diff changeset
113 \ select-layout select-pane select-window selectl selectp selectw send
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14006
diff changeset
114 \ send-keys send-prefix set set-buffer set-environment set-hook set-option
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14006
diff changeset
115 \ set-window-option setb setenv setw show show-buffer show-environment
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
116 \ show-hooks show-messages show-options show-prompt-history
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
117 \ show-window-options showb showenv showmsgs showphist showw source
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
118 \ source-file split-window splitw start start-server suspend-client suspendc
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
119 \ swap-pane swap-window swapp swapw switch-client switchc unbind unbind-key
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
120 \ unlink-window unlinkw wait wait-for
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
122 let &cpo = s:original_cpo
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
123 unlet! s:original_cpo s:bg s:i