Thursday, January 16, 2014

Adding Numbers to Lines in Vim

Select a bunch of lines, and then do this:


:let i=1 | '<,'>g/^/ s//\=i/ | let i+=1

No comments:

Post a Comment