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

前端 未结 16 1957
面向向阳花
面向向阳花 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:50

    It could come in handy to know:

    In order to select the same ammount of lines for example use 1v You should have done some modification to be able to use 1v, blockwise or linewise.

    Today I saw this amazing tip from here:

     :5mark < | 10mark > | normal gvV
     :5mark < | 10mark > | normal gv
    

    You can also reset the visual block boundaries doing so:

    m< .......... sets the visual mode start point
    m> .......... sets the visual mode end point
    

提交回复
热议问题