monaco-vim icon indicating copy to clipboard operation
monaco-vim copied to clipboard

Search/Substitute Syntax for limited searches

Open katlyn-edwards opened this issue 5 years ago • 1 comments

Vim supports search/substitution with bounded queries: :.,+2s/something/something_else

Which is supposed to search from the current line, to the current line plus 2, for the string something and replace it with something_else.

It looks like the +2 is ignored.

katlyn-edwards avatar Aug 01 '19 22:08 katlyn-edwards

I also ran into a similar issue with just :.s/something/something_else.

in particular if I have this code example:

badger
badger badger
badger badger badger
badger badge

Then I go to the third line and type .s/badger/mushroom/g, I get the following output:

badger
mushroom mushroom
mushroom badger badger
mushroom mushroom

when I wanted

badger
badger badger
mushroom mushroom mushroom
badger badge

Any ideas what the issue might be?

jnwei-zz avatar Mar 13 '20 21:03 jnwei-zz