From 78d3f4742872f535ebc75500afde4858985c40d8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 6 Jun 2024 06:40:11 +0800 Subject: vim-patch:92f4e91: runtime(vim): Update base-syntax, allow whitespace before :substitute pattern (#29210) Allow whitespace between the :substitute command and its pattern argument. Although unusual, it is supported and there are examples in the wild. Match Vi compatible :substitute commands like :s\/{string}/. See :help E1270. fixes: vim/vim#14920 closes: vim/vim#14923 https://github.com/vim/vim/commit/92f4e915908962da2c1969a8d60f1563e06ee00e Co-authored-by: Doug Kearns --- runtime/doc/syntax.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/doc/syntax.txt') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index cf553d6707..1e3dfe1e32 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3332,7 +3332,7 @@ embedded script highlighting they wish to have. > This option is disabled by default. *g:vimsyn_folding* -Some folding is now supported with syntax/vim.vim: > +Some folding is now supported with when 'foldmethod' is set to "syntax": > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups @@ -3343,6 +3343,11 @@ Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding =~ 'P' : fold python script g:vimsyn_folding =~ 'r' : fold ruby script < + +By default, g:vimsyn_folding is unset. Concatenate the indicated characters +to support folding of multiple syntax constructs; i.e. +g:vimsyn_folding = "fh" will enable folding of both functions and heredocs. + *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script is a difficult language to highlight correctly. A way to suppress error -- cgit