Jeff Roberts
RHCE #804006066322833
Vim-Fu is now iPhone and Android friendly

Check out the Vim-Fu Store!

Vim-Fu

increment/decrement number under cursor

I’ve been trying to find out how to do this for for a while now.

<ctrl>a to increment and <ctrl>x to decrement

 

This is great for zone file serial numbers. Try:

2009051601   <- Starting serial number

:/601/e   <-search for 601 and place cursor at the end of the match ie. on the “1″.

<ctrl>a to increment

2009051602  <- new serial number

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>