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