Smart search/replace in Vim

Posted by Amir Rachum on Stack Overflow See other posts from Stack Overflow or by Amir Rachum
Published on 2010-06-17T11:38:40Z Indexed on 2010/06/17 11:43 UTC
Read the original article Hit count: 280

Filed under:
|
|

I have a file with the following expressions:

something[0]

Where instead of 0 there could be different numbers. I want to replace all these occurances with

somethingElse0

Where the number should be the same as in the expression I replaced. How do I do that?

© Stack Overflow or respective owner

Related posts about vim

Related posts about vi