在 VS Code 中选择匹配括号之间的所有内容 [英] Select everything between matching brackets in VS Code

查看:22
本文介绍了在 VS Code 中选择匹配括号之间的所有内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS Code 中是否有可用的快捷方式来选择匹配括号之间的所有代码?例如.在Atom中,这个快捷键是ctrl+alt+m.

Is there in VS Code a shortcut available which selects all code between matching brackets? E.g. in Atom, this shortcut is ctrl+alt+m.

推荐答案

将光标放在括号内(不要直接放在括号旁边)并执行 editor.action.smartSelect.grow 直到里面的所有内容支架被选中.默认快捷键是 Shift+Alt+Right(或 Ctrl+Shift+在 Mac 上).

Place the cursor inside the bracket (not directly next to a bracket) and execute editor.action.smartSelect.grow until everything inside the bracket is selected. The default shortcut is Shift+Alt+Right (or Ctrl+Shift+Right on Mac).

您可以使用具有默认快捷键 Shift+Alt+Left 的 editor.action.smartSelect.shrink 缩小选择范围(或 Ctrl+Shift+Left 在 Mac 上).

You can shrink the selection with editor.action.smartSelect.shrink which has the default shortcut Shift+Alt+Left (or Ctrl+Shift+Left on Mac).

这篇关于在 VS Code 中选择匹配括号之间的所有内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆