Is there a way to emulate ReSharper's “extend selection” feature in Vim?

前端 未结 5 629
轮回少年
轮回少年 2021-02-09 04:32

ReSharper has a nice feature called \"extend selection\": by pressing CTRL+W (I think this is the default) repeatedly, you select more and more from your current ca

5条回答
  •  醉酒成梦
    2021-02-09 05:15

    One would need to write a function that would save the current selection, then try increasingly wide selections, until the new selection exceeds the saved one or selects all text. Some possible selections are:

    • viW - select word
    • vis - select sentence
    • vip - select paragraph
    • viB - select text within the innermost brackets
    • v2iB - select text within the next most innermost brackets
    • ggVG - select all text

提交回复
热议问题