Wednesday, January 07, 2009

Vim search and replace, with increment

:let i=1 | g/foo/s//\=i."morestuff"/ | let i=i+1

4 comments:

Nonsence said...

thanks mate :)

usefull cmd :)

Todd said...

Thanks for making vim even cooler!

baynaa said...

Works perfect!

Chris Hoffman said...

with backreferences?

Pyjamas

Blog Archive