Incrementing numbers ==================== Vim has this awesome function to increment numbers. If you don't know them yet, enter the following text in a new buffer: this is the line number 1 this is the line number 1 this is the line number 1 Then go on line 2, and press . Magic ! Vim will automatically increment the next number on the line. You could press it twice to increment by two, and so on. Oh, and by the way, vim knows hexadecimal! try incrementing "0x00ac". But what if you want to increment it up to 256? Would you bother pressing it 255 times? No that would be insane. Really insane. So let's just make vim do this insanity for us ! Use the following text: there are 1 ASCII chars in the table. Now press 255 (make sure your cursor is not after the number), and see your command executed 255 times by vim, incrementing the number to 256 ! I know. That's pretty cool ! What about doing even cooler? Add to following snippet to your .vimrc: fu! Incr() let a = line('.') - line("'<") let c = virtcol("'<") if a > 0 execute 'normal! '.c.'|'.a."\" endif normal `< endfu vnoremap :call Incr() Know what does it do? Let's find out. Enter the following text: this is the line number 1 this is the line number 1 this is the line number 1 ... Feel free to copy it like 200 times if you want. That would make the trick even cooler ! Now enter visual mode (linewise if you want) and select ALL THE LINES. Now, press . :wq