in VIM, you can do increment or decrement with the two key commands: 

 

they are 

 

ctrl-a : increase

ctrl-x: decrease

 

  • You can increment a number with control A
  • You can decrement a number with control X
  • If the cursor is not already on a number, either of these will advance the cursor to the next number
  • This does the math for multi-column numbers!

the original post is  http://dannyman.toldme.com/2008/01/23/vim-increment-decrement-integers/ - tip: Vim can add and substract.
Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐