1

Suddenly simple find&replace stopped working in one particular case. I'm selecting the code-block in visual-mode, so the final command looks like:

'<,'>%s/someStuff/stuff/gI

I get the error:

Trailing characters

It's very strange behavior because the same commands worked very well earlier.

Search and replace in VIM results in trailing characters didn't help.

2

You don't need %, as you already have another range ('<,'>) for your command s. So it must be simply '<,'>s/SomeStuff/stuff/gI.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.