From b94061a71d7b4ddfeb06faa22786f5aab762afe9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 16 Jan 2026 07:27:06 +0800 Subject: [PATCH] vim-patch:f25c343: runtime(csh): Support negated if in matchit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the matchit configuration chokes on valid syntax like: ```csh if !(true) then true endif ``` Make sure the negation syntax is supported. closes: vim/vim#19172 https://github.com/vim/vim/commit/f25c343b2639d393544106c21b3b0b58caa3adca Co-authored-by: Simão Afonso --- runtime/ftplugin/csh.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/ftplugin/csh.vim b/runtime/ftplugin/csh.vim index 74666b9680..6f8201b99d 100644 --- a/runtime/ftplugin/csh.vim +++ b/runtime/ftplugin/csh.vim @@ -5,6 +5,7 @@ " Contributor: Johannes Zellner " Last Change: 2024 Jan 14 " 2024 May 23 by Riley Bruins ('commentstring') +" 2026 Jan 15 improved matchit support if exists("b:did_ftplugin") finish @@ -31,7 +32,7 @@ let b:undo_ftplugin = "setlocal com< cms< fo<" if exists("loaded_matchit") && !exists("b:match_words") let s:line_start = '\%(^\s*\)\@<=' let b:match_words = - \ s:line_start .. 'if\s*(.*)\s*then\>:' .. + \ s:line_start .. 'if\s*!\?\s*(.*)\s*then\>:' .. \ s:line_start .. 'else\s\+if\s*(.*)\s*then\>:' .. s:line_start .. 'else\>:' .. \ s:line_start .. 'endif\>,' .. \ s:line_start .. '\%(\