Alex R. Young
Aug 2, 2015 · 1 min read

In Vim patch 7.4.754, I noticed Vim now supports incrementing numbers in Visual mode. You can increment numbers by pressing CTRL-A, and decrement with CTRL-X. It's one of those features that doesn't sound amazingly useful but can be handy once you've memorised it. If you build off Vim's master branch you can try it out now.

Visual increment
Visual increment

To enter Visual mode, type CTRL-V (technically Visual mode blockwise). You can then use hjkl to select multiple lines, and increment the numbers on each line with CTRL-A. I thought this might be good for shifting sets of numbers in a numerical list, like you might find in a Markdown file for example.

usevim

A blog about Vim

Alex R. Young

Written by

Software critic.

usevim

usevim

A blog about Vim

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade