Vim: faster way to select blocks of text in visual mode

前端 未结 16 2324
面向向阳花
面向向阳花 2021-01-29 17:12

I have been using vim for quite some time and am aware that selecting blocks of text in visual mode is as simple as SHIFT+V and moving the arrow key up or

16条回答
  •  不知归路
    2021-01-29 17:41

    You can always just use antecedent numbers to repeat actions:

    • In visual mode, type 35 and the cursor will move down 35 times, selecting the next 35 lines
    • In normal mode:
      • delete 35 lines 35dd
      • paste 35 times 35p
      • undo 35 changes 35u
      • etc.

提交回复
热议问题