From 8c173cec295cf8c78bdbc440dc87f0473560f69a Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 18 Dec 2023 10:09:57 +0100 Subject: [PATCH] vim-patch:b42703a662e8 runtime(tmux): Update tmux syntax rules (vim/vim#13708) https://github.com/vim/vim/commit/b42703a662e87ef0ab643f417869851f065eaac4 Co-authored-by: Eric Pruitt --- runtime/syntax/tmux.vim | 160 ++++++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 71 deletions(-) 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=/\\\@