diff options
author | Doug Kearns <dougkearns@gmail.com> | 2024-06-05 19:45:43 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-05 19:47:04 +0200 |
commit | 92f4e915908962da2c1969a8d60f1563e06ee00e (patch) | |
tree | ff212d12c4885b6f62bab45186fc731e0a660477 /runtime/syntax/testdir/input/vim_ex_substitute.vim | |
parent | dca57fb54200530a0874c90fab799a689c00c597 (diff) |
runtime(vim): Update base-syntax, allow whitespace before :substitute pattern
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: #14920
closes: #14923
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax/testdir/input/vim_ex_substitute.vim')
-rw-r--r-- | runtime/syntax/testdir/input/vim_ex_substitute.vim | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/input/vim_ex_substitute.vim b/runtime/syntax/testdir/input/vim_ex_substitute.vim index 340d573ac1..021060a0c8 100644 --- a/runtime/syntax/testdir/input/vim_ex_substitute.vim +++ b/runtime/syntax/testdir/input/vim_ex_substitute.vim @@ -73,6 +73,64 @@ s{/{//{ " comment s}/}//} " comment s~/~//~ " comment +s !/!//! " comment +" s "/"//" " comment (works but disallowed) +s #/#//# " comment +s $/$//$ " comment +s %/%//% " comment +s &/&//& " comment +s '/'//' " comment +" FIXME - matches vimUserFunc +" s (/(//( " comment +s )/)//) " comment +s */*//* " comment +s +/+//+ " comment +s ,/,//, " comment +s -/-//- " comment +s ././/. " comment +s /X/XX/ " comment +s :/://: " comment +s ;/;//; " comment +s </<//< " comment +s =/=//= " comment +s >/>//> " comment +s ?/?//? " comment +s @/@//@ " comment +s [/[//[ " comment +" s \/\//\ " comment (disallowed) +s ]/]//] " comment +s ^/^//^ " comment +s _/_//_ " comment +s `/`//` " comment +s {/{//{ " comment +" s |/|//| " comment (disallowed) +s }/}//} " comment +s ~/~//~ " comment + +s//{string}/ +s //{string}/ + + +" Vi compatibility + +s\/{string}/ +s\?{string}? +s\&{string}& + +s \/{string}/ +s \?{string}? +s \&{string}& + + +" Trailing comment and bar + +" FIXME: trailing comment, no whitespace +s" comment +s| echo "Foo" + +s " comment +s | echo "Foo" + " Issue #13883 |