Sunday, March 18, 2012

Increase/decrease Digit Under in VI

A cool little trick for changing a number in vi. If you place the cursor on a number (pick any digit), ctrl-a (ctrl-x) increases (decreases) the number!  In the case of a decimal number, this will increase (decrease) the integer or fractional part, depending on whether the cursor is on a digit in the integer or fractional part.  Nice!

No comments:

Post a Comment