line with "user1", and then replace the "1" with the correct number on
each line. Something like this would do it:
:let n = 1
:g/^/s/1/\=n/ | let n = n + 1
That just uses a variable n which is initialized to 1 and increments
after each replacement.
This also seems like a good use case for the VisIncr plugin:
http://vim.sourceforge.net/scripts/script.php?script_id=670.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment