Selecting block of code in Visual Studio Code

前端 未结 5 1270
星月不相逢
星月不相逢 2020-12-30 04:39

Is there a keyboard shortcut or an extension that would allow me to select a block of code? I\'d like to select everything between curly braces, between html tags, etc.

5条回答
  •  清酒与你
    2020-12-30 04:44

    A quicker way is selecting a line then expanding the selection like this:

    1. Select line
      ctrl + L
    2. Expand selection
      alt + shift +

    Doing this inside a block(html element, javascript curly braces) will select the inner block(html element content, inside curly braces). Do step 2 again to select block including the container(html element, whole function, class, etc...)

提交回复
热议问题