comparison runtime/syntax/tmux.vim @ 28246:e3d6184b89fa

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