annotate runtime/syntax/tmux.vim @ 15862:2ab6321fd355 v8.1.0938

patch 8.1.0938: background color is wrong in MS-Windows console commit https://github.com/vim/vim/commit/21edde87426eeeaf46e118a137a7fa0e86ad167e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 17 14:10:56 2019 +0100 patch 8.1.0938: background color is wrong in MS-Windows console Problem: Background color is wrong in MS-Windows console when not using VTP. Solution: Use g_attrCurrent. (Nobuhiro Takasaki, closes https://github.com/vim/vim/issues/3987)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Feb 2019 14:15:05 +0100
parents 665fe1f419b0
children c002c4899529
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
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
2 " Version: 2.7 (git-e4e060f2)
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
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"
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
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
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
65 \ buffer-limit command-alias default-terminal escape-time exit-empty
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
66 \ activity-action assume-paste-time base-index bell-action default-command
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 \ default-shell destroy-unattached detach-on-destroy
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 \ display-panes-active-colour display-panes-colour display-panes-time
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
69 \ display-time exit-unattached focus-events history-file history-limit
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
70 \ key-table lock-after-time lock-command message-attr message-bg
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
71 \ message-command-attr message-command-bg message-command-fg
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
72 \ message-command-style message-fg message-limit message-style mouse
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
73 \ aggressive-resize allow-rename alternate-screen automatic-rename
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
74 \ automatic-rename-format clock-mode-colour clock-mode-style force-height
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
75 \ force-width main-pane-height main-pane-width mode-attr mode-bg mode-fg
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
76 \ mode-keys mode-style monitor-activity monitor-bell monitor-silence
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
77 \ other-pane-height other-pane-width pane-active-border-bg
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
78 \ pane-active-border-fg pane-active-border-style pane-base-index
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
79 \ pane-border-bg pane-border-fg pane-border-format pane-border-status
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
80 \ pane-border-style prefix prefix2 remain-on-exit renumber-windows
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
81 \ repeat-time set-clipboard set-titles set-titles-string silence-action
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 \ status status-attr status-bg status-fg status-interval status-justify
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 \ 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
84 \ status-left-length status-left-style status-position status-right
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 \ status-right-attr status-right-bg status-right-fg status-right-length
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
86 \ status-right-style status-style synchronize-panes terminal-overrides
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
87 \ update-environment user-keys visual-activity visual-bell visual-silence
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
88 \ window-active-style window-status-activity-attr window-status-activity-bg
11062
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
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
96 \ window-status-style window-style word-separators wrap-search xterm-keys
11062
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
14006
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
99 \ attach attach-session bind bind-key break-pane breakp capture-pane
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
100 \ capturep choose-buffer choose-client choose-tree clear-history clearhist
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
101 \ clock-mode command-prompt confirm confirm-before copy-mode detach
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
102 \ detach-client display display-message display-panes displayp find-window
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
103 \ findw if if-shell join-pane joinp kill-pane kill-server kill-session
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
104 \ kill-window killp has-session has killw link-window linkw list-buffers
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
105 \ list-clients list-commands list-keys list-panes list-sessions list-windows
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
106 \ load-buffer loadb lock lock-client lock-server lock-session last-pane
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
107 \ lastp lockc locks last-window last ls lsb delete-buffer deleteb lsc lscm
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
108 \ lsk lsp lsw move-pane move-window movep movew new new-session new-window
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
109 \ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
110 \ pipep prev previous-layout previous-window prevl refresh refresh-client
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
111 \ rename rename-session rename-window renamew resize-pane resizep
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
112 \ respawn-pane respawn-window respawnp respawnw rotate-window rotatew run
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
113 \ run-shell save-buffer saveb select-layout select-pane select-window
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
114 \ selectl selectp selectw send send-keys send-prefix set set-buffer
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
115 \ set-environment set-hook set-option set-window-option setb setenv setw
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
116 \ show show-buffer show-environment show-hooks show-messages show-options
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
117 \ show-window-options showb showenv showmsgs showw source source-file
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
118 \ split-window splitw start start-server suspend-client suspendc swap-pane
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
diff changeset
119 \ swap-window swapp swapw switch-client switchc unbind unbind-key
665fe1f419b0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11160
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