mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-10-11 22:49:29 +02:00
- 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>
51 lines
860 B
VimL
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
|
|
|