News for hackers. Stuff that matters.
Re:Best of Vim Tips by res0nat0r on Thursday January 07, 2010 @03:48PM (#1038000)
This is the best list of vim tips online I believe, and the author is always updating it. Last update: 22-DEC-09

One of my favorites that has saved me a ton of time more than once:

" rename a string with an incrementing number

:let i=10 | 'a,'bg/Abc/s/yy/\=i/ |let i=i+1 # convert yy to 10,11,12 etc

Re:Best of Vim Tips by jamesbritt on Thursday January 07, 2010 @09:32PM (#1038644)
"This is the best list of vim tips online "

When does a collection of items go from a list of tips to a lengthy compendium of details?

Like others, I started looking over the page and got discouraged; there's too damn much.

Re:Best of Vim Tips by 10ren on Friday January 08, 2010 @01:33AM (#1039028)
For my understanding (ignoring the loop):

    between mark a and mark b: 'a,'b
    goto lines containing Abc: g/Abc
    recognizable substitute:   s/yy/\=i/
      = prefixes a variable (escaped with \)
A problem is that it will only replace the first `yy` on the line (if you add g, to make it s/yy/\=i/g, it replaces all of them, but with the same value of i.

How to make it increment multiple yy's on the one line?