How to increment in vim under windows (where CTRL-A does not work…)

后端 未结 7 2259
不知归路
不知归路 2020-12-08 15:32

While CtrlX works fine in vim under windows, CtrlA selects all (duh).

Is there a way to increment a number with a keystro

7条回答
  •  不知归路
    2020-12-08 15:53

    I modified TMealy's solution so that CtrlA still selects all (I find this useful), while CtrlI increments (also useful).

    noremap  
    
    " CTRL-A is Select all
    noremap  gggHG
    inoremap  gggHG
    cnoremap  gggHG
    onoremap  gggHG
    snoremap  gggHG
    xnoremap  ggVG
    

提交回复
热议问题