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>
This commit is contained in:
committed by
Christian Brabandt
parent
dca57fb542
commit
92f4e91590
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user