Saved Searches (Mostly Code & System Administration)

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
Posted by Flicken at 1:46 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: vim
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ▼  2014 (1)
    • ▼  January (1)
      • Adding Numbers to Lines in Vim
  • ►  2013 (2)
    • ►  December (2)

About Me

My photo
Flicken
View my complete profile
Simple theme. Powered by Blogger.