Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
tmux.vim173 linesDownload Raw Back to syntax
1" Language: tmux(1) configuration file2" Version: 3.4 (git-3d8ead8a)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 7if exists("b:current_syntax")8    finish9endif10 11" Explicitly change compatibility options to Vim's defaults because this file12" uses line continuations.13let s:original_cpo = &cpo14set cpo&vim15 16let b:current_syntax = "tmux"17syntax iskeyword @,48-57,_,192-255,-18syntax case match19 20" The values "yes" and "no" are synonyms for "on" and "off", so they do not21" appear in the option table file.22syn keyword tmuxEnums yes no23 24syn keyword tmuxTodo FIXME NOTE TODO XXX contained25 26syn match tmuxColour            /\<colou\?r[0-9]\+\>/  display27syn match tmuxKey               /\(C-\|M-\|\^\)\+\S\+/ display28syn match tmuxNumber            /\<\d\+\>/             display29syn match tmuxFlags             /\s-\a\+/              display30syn match tmuxVariableExpansion /\$\({[A-Za-z_]\w*}\|[A-Za-z_]\w*\)/ display31syn match tmuxControl           /\(^\|\s\)%\(if\|elif\|else\|endif\|hidden\)\($\|\s\)/ display32syn match tmuxEscape            /\\\(u\x\{4\}\|U\x\{8\}\|\o\{3\}\|[\\ernt$]\)/ display33 34" Missing closing bracket.35syn match tmuxInvalidVariableExpansion /\${[^}]*$/ display36" Starts with invalid character.37syn match tmuxInvalidVariableExpansion /\${[^A-Za-z_][^}]*}/ display38syn match tmuxInvalidVariableExpansion /\$[^A-Za-z_{ \t]/ display39" Contains invalid character.40syn match tmuxInvalidVariableExpansion /\${[^}]*[^A-Za-z0-9_}][^}]*}/ display41 42syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo,@Spell43 44syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,tmuxEscape,tmuxVariableExpansion,tmuxInvalidVariableExpansion,@Spell45syn region tmuxUninterpolatedString start=+'+ skip=+\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell46 47" TODO: Figure out how escaping works inside of #(...) and #{...} blocks.48syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend49syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend50syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend51 52" At the time of this writing, the latest tmux release will parse a line53" reading "abc=xyz set-option ..." as an assignment followed by a command54" hence the presence of "\s" in the "end" argument.55syn region tmuxAssignment matchgroup=tmuxVariable start=/^\s*[A-Za-z_]\w*=\@=/ skip=/\\$\|\\\s/ end=/\s\|$/ contains=tmuxString,tmuxUninterpolatedString,tmuxVariableExpansion,tmuxControl,tmuxEscape,tmuxInvalidVariableExpansion56 57hi def link tmuxFormatString      Identifier58hi def link tmuxAction            Boolean59hi def link tmuxBoolean           Boolean60hi def link tmuxCommands          Keyword61hi def link tmuxControl           PreCondit62hi def link tmuxComment           Comment63hi def link tmuxEnums             Boolean64hi def link tmuxEscape            Special65hi def link tmuxEscapeUnquoted    Special66hi def link tmuxInvalidVariableExpansion67\                                 Error68hi def link tmuxKey               Special69hi def link tmuxNumber            Number70hi def link tmuxFlags             Identifier71hi def link tmuxOptions           Function72hi def link tmuxString            String73hi def link tmuxTodo              Todo74hi def link tmuxUninterpolatedString75\                                 String76hi def link tmuxVariable          Identifier77hi def link tmuxVariableExpansion Identifier78 79" Make the foreground of colourXXX keywords match the color they represent80" when g:tmux_syntax_colors is unset or set to a non-zero value.81" Darker colors have their background set to white.82if get(g:, "tmux_syntax_colors", 1)83    for s:i in range(0, 255)84        let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none"85        exec "syn match tmuxColour" . s:i . " /\\<colou\\?r" . s:i . "\\>/ display"86\         " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg87    endfor88endif89 90syn keyword tmuxOptions91\ activity-action after-bind-key after-capture-pane after-copy-mode92\ after-display-message after-display-panes after-kill-pane after-list-buffers93\ after-list-clients after-list-keys after-list-panes after-list-sessions94\ after-list-windows after-load-buffer after-lock-server after-new-session95\ after-new-window after-paste-buffer after-pipe-pane after-queue96\ after-refresh-client after-rename-session after-rename-window97\ after-resize-pane after-resize-window after-save-buffer after-select-layout98\ after-select-pane after-select-window after-send-keys after-set-buffer99\ after-set-environment after-set-hook after-set-option after-show-environment100\ after-show-messages after-show-options after-split-window after-unbind-key101\ aggressive-resize alert-activity alert-bell alert-silence allow-passthrough102\ allow-rename allow-set-title alternate-screen assume-paste-time103\ automatic-rename automatic-rename-format backspace base-index bell-action104\ buffer-limit client-active client-attached client-detached client-focus-in105\ client-focus-out client-resized client-session-changed clock-mode-color106\ clock-mode-colour clock-mode-style command-alias command-error copy-command107\ copy-mode-current-match-style copy-mode-mark-style copy-mode-match-style108\ cursor-color cursor-colour cursor-style default-command default-shell109\ default-size default-terminal destroy-unattached detach-on-destroy110\ display-panes-active-color display-panes-active-colour display-panes-color111\ display-panes-colour display-panes-time display-time editor escape-time112\ exit-empty exit-unattached extended-keys fill-character focus-events113\ history-file history-limit key-table lock-after-time lock-command114\ main-pane-height main-pane-width menu-border-lines menu-border-style115\ menu-selected-style menu-style message-command-style message-limit116\ message-line message-style mode-keys mode-style monitor-activity monitor-bell117\ monitor-silence mouse other-pane-height other-pane-width118\ pane-active-border-style pane-base-index pane-border-format119\ pane-border-indicators pane-border-lines pane-border-status pane-border-style120\ pane-colors pane-colours pane-died pane-exited pane-focus-in pane-focus-out121\ pane-mode-changed pane-set-clipboard pane-title-changed popup-border-lines122\ popup-border-style popup-style prefix prefix2 prompt-history-limit123\ remain-on-exit remain-on-exit-format renumber-windows repeat-time124\ scroll-on-clear session-closed session-created session-renamed125\ session-window-changed set-clipboard set-titles set-titles-string126\ silence-action status status-bg status-fg status-format status-interval127\ status-justify status-keys status-left status-left-length status-left-style128\ status-position status-right status-right-length status-right-style129\ status-style synchronize-panes terminal-features terminal-overrides130\ update-environment user-keys visual-activity visual-bell visual-silence131\ window-active-style window-layout-changed window-linked window-pane-changed132\ window-renamed window-resized window-size window-status-activity-style133\ window-status-bell-style window-status-current-format134\ window-status-current-style window-status-format window-status-last-style135\ window-status-separator window-status-style window-style window-unlinked136\ word-separators wrap-search xterm-keys137 138syn keyword tmuxCommands139\ attach attach-session bind bind-key break-pane breakp capture-pane capturep140\ choose-buffer choose-client choose-session choose-tree choose-window141\ clear-history clear-prompt-history clearhist clearphist clock-mode142\ command-prompt confirm confirm-before copy-mode customize-mode delete-buffer143\ deleteb detach detach-client display display-menu display-message144\ display-panes display-popup displayp find-window findw has has-session if145\ if-shell info join-pane joinp kill-pane kill-server kill-session kill-window146\ killp killw last last-pane last-window lastp link-window linkw list-buffers147\ list-clients list-commands list-keys list-panes list-sessions list-windows148\ load-buffer loadb lock lock-client lock-server lock-session lockc locks ls149\ lsb lsc lscm lsk lsp lsw menu move-pane move-window movep movew new150\ new-session new-window neww next next-layout next-window nextl paste-buffer151\ pasteb pipe-pane pipep popup prev previous-layout previous-window prevl152\ refresh refresh-client rename rename-session rename-window renamew153\ resize-pane resize-window resizep resizew respawn-pane respawn-window154\ respawnp respawnw rotate-window rotatew run run-shell save-buffer saveb155\ select-layout select-pane select-window selectl selectp selectw send156\ send-keys send-prefix server-access server-info set set-buffer157\ set-environment set-hook set-option set-window-option setb setenv setw show158\ show-buffer show-environment show-hooks show-messages show-options159\ show-prompt-history show-window-options showb showenv showmsgs showphist160\ showw source source-file split-pane split-window splitp splitw start161\ start-server suspend-client suspendc swap-pane swap-window swapp swapw162\ switch-client switchc unbind unbind-key unlink-window unlinkw wait wait-for163 164syn keyword tmuxEnums165\ absolute-centre all always any arrows bar blinking-bar blinking-block166\ blinking-underline block both bottom centre color colour current default167\ double emacs external failed heavy keep-group keep-last largest latest left168\ manual next no-detached none number off on other padded previous right169\ rounded simple single smallest top underline vi170 171let &cpo = s:original_cpo172unlet! s:original_cpo s:bg s:i173 
codekingpro/portable-devtools · Team Ai