Selecting block of code in Visual Studio Code

前端 未结 5 1271
星月不相逢
星月不相逢 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:56

    Use alt + shift + to expand selection between braces or tags,
    Use alt + shift + to shrink selection between braces or tags.

    Here is vc shortcuts cheatsheet that might help you.

    Update 2019/3: this inner functionality of vs is not working very well after some updates, alt + shift + → now selects things including braces (which annoys me), not like its behavior before, it selected things between curly braces before, when I first posted this answer. I'm using Mark's answer now. If anyone has better soulution (without extension) now, please leave a comment.

提交回复
热议问题