dannyman.toldme.com


Technical

TIP: Vim can add and subtract!

I have been using Vim for years, and have any number of times (say, when dealing with DNS configuration) had to edit many lines, changing integers by a constant value, and it was always a hassle to repeatedly switch modes and type in a new number. “There must be some macro or other special mojo,” I thought, “and sometime, I will figure this out.”

Well, there is special mojo, and the figuring it out is so dead simple I kick myself for not knowing this years ago:

Vim Tip 287: Cool trick to change numbers

Yes, I rated that tip as “life changing”!

Read More

Next:
Previous:
Categories: Technical
Possibly-Related Posts

Response

June 19th, 2008

Sharath

Hi Danny,

This is one of very good feature in Vim. Thanks for giving a very useful information.

Regards,
Sharath.

Comment

Leave a comment . . .

Tiny Print:

  1. For private messages, e-mail me: dannyman@toldme.com.
  2. You must provide an e-mail address.
  3. You can use a bogus e-mail address, but I like to know who you are.
  4. I will not spam you. I will not publish or share your e-mail address.
  5. First-time commenters will be held for review.
  6. You can use these HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>