tmux/examples/tmux.vim

315 lines
5.5 KiB
VimL
Raw Normal View History

2008-12-20 09:09:57 +00:00
" Vim syntax file
" Language: tmux(1) configuration file
2012-07-16 22:19:13 +00:00
" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net>
" Last Change: $Date: 2010-07-27 18:29:07 $
2009-10-25 22:16:55 +00:00
" License: This file is placed in the public domain.
"
" To install this file:
"
" - Drop the file in the syntax directory into runtimepath (such as
" ~/.vim/syntax/tmux.vim).
" - Make the filetype recognisable by adding the following to filetype.vim
" (~/.vim/filetype.vim):
"
" augroup filetypedetect
" au BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
" augroup END
"
" - Switch on syntax highlighting by adding "syntax enable" to .vimrc.
"
2008-12-20 09:09:57 +00:00
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
setlocal iskeyword+=-
syntax case match
syn keyword tmuxAction any current none
syn keyword tmuxBoolean off on
2012-07-16 22:19:13 +00:00
syn keyword tmuxCmds
2015-12-07 12:54:34 +00:00
\ attach
\ attach-session
\ bind
\ bind-key
\ break-pane
\ breakp
\ capture-pane
\ capturep
\ choose-buffer
\ choose-client
\ choose-session
\ choose-tree
\ choose-window
\ clear-history
\ clearhist
\ clock-mode
\ command-prompt
2015-12-07 12:54:34 +00:00
\ confirm
\ confirm-before
\ copy-mode
\ delete-buffer
\ deleteb
2015-12-07 12:54:34 +00:00
\ detach
\ detach-client
\ display
\ display-message
\ display-panes
\ displayp
\ find-window
\ findw
2015-12-07 12:54:34 +00:00
\ has
\ has-session
\ if
\ if-shell
\ info
\ join-pane
\ joinp
\ kill-pane
\ kill-server
\ kill-session
\ kill-window
2015-12-07 12:54:34 +00:00
\ killp
\ killw
2015-12-07 12:54:34 +00:00
\ last
\ last-pane
2015-12-07 12:54:34 +00:00
\ last-window
\ lastp
\ link-window
\ linkw
\ list-buffers
\ list-clients
\ list-commands
\ list-keys
\ list-panes
\ list-sessions
\ list-windows
\ load-buffer
\ loadb
2015-12-07 12:54:34 +00:00
\ lock
\ lock-client
2015-12-07 12:54:34 +00:00
\ lock-server
\ lock-session
2015-12-07 12:54:34 +00:00
\ lockc
\ locks
2015-12-07 12:54:34 +00:00
\ ls
\ lsb
\ lsc
\ lscm
\ lsk
\ lsp
\ lsw
\ move-pane
\ move-window
2015-12-07 12:54:34 +00:00
\ movep
\ movew
2015-12-07 12:54:34 +00:00
\ new
\ new-session
\ new-window
\ neww
\ next
\ next-layout
2015-12-07 12:54:34 +00:00
\ next-window
\ nextl
\ paste-buffer
\ pasteb
2015-12-07 12:54:34 +00:00
\ path
\ pipe-pane
\ pipep
2015-12-07 12:54:34 +00:00
\ prev
\ previous-layout
2015-12-07 12:54:34 +00:00
\ previous-window
\ prevl
2015-12-07 12:54:34 +00:00
\ refresh
\ refresh-client
\ rename
\ rename-session
\ rename-window
\ renamew
\ resize-pane
\ resizep
\ respawn-pane
\ respawn-window
2015-12-07 12:54:34 +00:00
\ respawnp
\ respawnw
\ rotate-window
\ rotatew
2015-12-07 12:54:34 +00:00
\ run
\ run-shell
\ save-buffer
\ saveb
\ select-layout
\ select-pane
\ select-window
2015-12-07 12:54:34 +00:00
\ selectl
\ selectp
\ selectw
2015-12-07 12:54:34 +00:00
\ send
\ send-keys
\ send-prefix
\ server-info
2015-12-07 12:54:34 +00:00
\ set
\ set-buffer
\ set-environment
2015-12-07 12:54:34 +00:00
\ set-option
\ set-window-option
2015-12-07 12:54:34 +00:00
\ setb
\ setenv
\ setw
2015-12-07 12:54:34 +00:00
\ show
\ show-buffer
\ show-environment
\ show-messages
2015-12-07 12:54:34 +00:00
\ show-options
\ show-window-options
2015-12-07 12:54:34 +00:00
\ showb
\ showenv
\ showmsgs
\ showw
2015-12-07 12:54:34 +00:00
\ source
\ source-file
\ split-window
\ splitw
2015-12-07 12:54:34 +00:00
\ start
\ start-server
\ suspend-client
\ suspendc
\ swap-pane
\ swap-window
2015-12-07 12:54:34 +00:00
\ swapp
\ swapw
\ switch-client
\ switchc
2015-12-07 12:54:34 +00:00
\ unbind
\ unbind-key
\ unlink-window
\ unlinkw
2015-12-07 12:54:34 +00:00
\ wait
\ wait-for
2008-12-20 09:09:57 +00:00
2012-07-16 22:19:13 +00:00
syn keyword tmuxOptsSet
\ assume-paste-time
\ base-index
\ bell-action
\ bell-on-alert
\ buffer-limit
\ default-command
\ default-shell
\ default-terminal
\ destroy-unattached
\ detach-on-destroy
\ display-panes-active-colour
\ display-panes-colour
\ display-panes-time
\ display-time
\ escape-time
\ exit-unattached
\ focus-events
2015-08-07 14:06:17 +00:00
\ history-file
\ history-limit
\ lock-after-time
\ lock-command
\ message-command-style
\ message-limit
\ message-style
2015-07-19 07:07:55 +00:00
\ mouse
\ mouse-utf8
\ prefix
\ prefix2
\ quiet
\ renumber-windows
\ repeat-time
\ set-clipboard
\ set-remain-on-exit
\ set-titles
\ set-titles-string
\ status
\ status-interval
\ status-justify
\ status-keys
\ status-left
\ status-left-length
\ status-left-style
\ status-position
\ status-right
\ status-right-length
2015-12-07 12:54:34 +00:00
\ status-right-style
\ status-style
\ status-utf8
\ terminal-overrides
\ update-environment
\ visual-activity
\ visual-bell
\ visual-silence
\ word-separators
2008-12-20 09:09:57 +00:00
2012-07-16 22:19:13 +00:00
syn keyword tmuxOptsSetw
\ aggressive-resize
\ allow-rename
\ alternate-screen
\ automatic-rename
2015-12-07 12:54:34 +00:00
\ automatic-rename-format
\ clock-mode-colour
\ clock-mode-style
\ force-height
\ force-width
\ main-pane-height
\ main-pane-width
\ mode-keys
\ mode-style
\ monitor-activity
\ monitor-silence
\ other-pane-height
\ other-pane-width
2015-12-07 12:54:34 +00:00
\ pane-active-border-style
\ pane-base-index
2015-12-07 12:54:34 +00:00
\ pane-border-style
\ remain-on-exit
\ synchronize-panes
\ utf8
2015-07-19 07:07:55 +00:00
\ window-active-style
\ window-status-activity-style
\ window-status-bell-style
\ window-status-current-format
\ window-status-current-style
\ window-status-format
\ window-status-last-style
\ window-status-separator
\ window-status-style
2015-07-19 07:07:55 +00:00
\ window-style
\ wrap-search
\ xterm-keys
2008-12-20 09:09:57 +00:00
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
2008-12-20 09:09:57 +00:00
syn match tmuxNumber /\d\+/ display
syn match tmuxOptions /\s-\a\+/ display
2008-12-20 09:09:57 +00:00
syn match tmuxVariable /\w\+=/ display
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
2015-08-15 08:53:19 +00:00
" Comments can span multiple lines, when the newline is escaped
" (with a single) backslash at the end.
syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo
2008-12-20 09:09:57 +00:00
syn region tmuxString start=/"/ end=/"/ display oneline
syn region tmuxString start=/'/ end=/'/ display oneline
hi def link tmuxAction Boolean
hi def link tmuxBoolean Boolean
hi def link tmuxCmds Keyword
hi def link tmuxComment Comment
hi def link tmuxKey Special
hi def link tmuxNumber Number
hi def link tmuxOptions Identifier
hi def link tmuxOptsSet Function
hi def link tmuxOptsSetw Function
2008-12-20 09:09:57 +00:00
hi def link tmuxString String
hi def link tmuxTodo Todo
hi def link tmuxVariable Constant
hi def link tmuxVariableExpansion Constant
let b:current_syntax = "tmux"