Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search/Substitute Syntax for limited searches #34

Open
katlyn-edwards opened this issue Aug 1, 2019 · 1 comment
Open

Search/Substitute Syntax for limited searches #34

katlyn-edwards opened this issue Aug 1, 2019 · 1 comment

Comments

@katlyn-edwards
Copy link
Contributor

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.

@jnwei-zz
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants