# HG changeset patch # User Christian Brabandt # Date 1702887305 -3600 # Node ID 807ee2d19cafe94d4f27b98f591eced011821177 # Parent 58f20e60fa3a6e983e37610d4ff6a9b95a49b613 runtime(tmux): Update tmux syntax rules (#13708) Commit: https://github.com/vim/vim/commit/b42703a662e87ef0ab643f417869851f065eaac4 Author: Eric Pruitt Date: Mon Dec 18 00:03:40 2023 -0800 runtime(tmux): Update tmux syntax rules (https://github.com/vim/vim/issues/13708) Signed-off-by: Eric Pruitt Signed-off-by: Christian Brabandt diff --git a/runtime/syntax/tmux.vim b/runtime/syntax/tmux.vim --- 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 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=/\\\@