diff --git a/runtime/syntax/tmux.vim b/runtime/syntax/tmux.vim index 042b96e872..d2b31e874c 100644 --- a/runtime/syntax/tmux.vim +++ b/runtime/syntax/tmux.vim @@ -1,5 +1,5 @@ " Language: tmux(1) configuration file -" Version: 3.3-rc (git-964deae4) +" Version: 3.3a (git-e7c829fc) " URL: https://github.com/ericpruitt/tmux.vim/ " Maintainer: Eric Pruitt " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) @@ -17,8 +17,9 @@ let b:current_syntax = "tmux" syntax iskeyword @,48-57,_,192-255,- syntax case match -syn keyword tmuxAction none any current other -syn keyword tmuxBoolean off on yes no +" The values "yes" and "no" are synonyms for "on" and "off", so they do not +" appear in the option table file. +syn keyword tmuxEnums yes no syn keyword tmuxTodo FIXME NOTE TODO XXX contained @@ -27,12 +28,20 @@ syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display syn match tmuxNumber /\<\d\+\>/ display syn match tmuxFlags /\s-\a\+/ display syn match tmuxVariableExpansion /\$\({[A-Za-z_]\w*}\|[A-Za-z_]\w*\)/ display -syn match tmuxControl /^\s*%\(if\|elif\|else\|endif\)\>/ +syn match tmuxControl /\(^\|\s\)%\(if\|elif\|else\|endif\)\($\|\s\)/ display syn match tmuxEscape /\\\(u\x\{4\}\|U\x\{8\}\|\o\{3\}\|[\\ernt$]\)/ display +" Missing closing bracket. +syn match tmuxInvalidVariableExpansion /\${[^}]*$/ display +" Starts with invalid character. +syn match tmuxInvalidVariableExpansion /\${[^A-Za-z_][^}]*}/ display +syn match tmuxInvalidVariableExpansion /\$[^A-Za-z_{ \t]/ display +" Contains invalid character. +syn match tmuxInvalidVariableExpansion /\${[^}]*[^A-Za-z0-9_][^}]*}/ display + syn region tmuxComment start=/#/ skip=/\\\@