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