I got a track list for a CD that I ripped but this list didn’t have the track numbers. So I saved the list to a text file and opened it up in gVim. Vim is an awesome text editor; you can do almost any sort of text manipulation in there, including the easy task of adding line numbers. Anyways, here is the command that I used to add line numbers to the text. Enjoy Vim’ing!

%s/^/\=line('.') /g
Back to blog...