Files
Doug Kearns 7c16e2127f runtime(vim): Update base syntax, terminate :g/:s patterns at EOL
- Terminate :global patterns, and :substitute patterns and replacement
  text, at EOL.  The closing delimiter is optional.
- Clarify the behaviour of optional pattern terminators in the :global
  and :substitute help sections.

related: #21132
closes:  #21367

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-09-24 20:43:54 +00:00

51 lines
860 B
VimL

" Vim :global and :v commands
global/foo
global!/foo
vglobal/foo
global/foo/echo "..."
global!/foo/echo "..."
vglobal/foo/echo "..."
global /foo/ echo "..."
global! /foo/ echo "..."
vglobal /foo/ echo "..."
" docs state ! is not allowed as the delimiter but it works
global!!foo!echo "..."
global! !foo! echo "..."
" command with range
global/./.,/^$/join
" recursive
global/found/v/not\%(found\)/echo "..."
def Vim9Context()
global/foo
global!/foo
vglobal/foo
global/foo/echo "..."
global!/foo/echo "..."
vglobal/foo/echo "..."
global /foo/ echo "..."
global! /foo/ echo "..."
vglobal /foo/ echo "..."
# docs state ! is not allowed as the delimiter but it works
global!!foo!echo "..."
global! !foo! echo "..."
# command with range
global/./.,/^$/join
# recursive
global/found/v/not\%(found\)/echo "..."
enddef