VSCode select 两个 brackets/parentheses 之间的代码块的快捷方式?
VSCode shortcut to select the block of code between two brackets/parentheses?
我正在寻找一个键盘快捷键,它可以选择与光标位置相比的两个括号或括号或方括号之间的代码块。
示例:
const object = {
ifTheCursorIs: 'anywhere between the bracket above',
andTheBracketBelow: 'it should select all everything between them',
}
//so if I press the shortcut, then press backspace,
const object = {}
//should remain
我想这个 post 就是您要找的:
对于 mac 用户,简短的回答是:
使用ctrl
+ shift
+ →
来扩展大括号或标签之间的选择,
使用 ctrl
+ shift
+ ←
缩小大括号或标签之间的选择。
我正在寻找一个键盘快捷键,它可以选择与光标位置相比的两个括号或括号或方括号之间的代码块。
示例:
const object = {
ifTheCursorIs: 'anywhere between the bracket above',
andTheBracketBelow: 'it should select all everything between them',
}
//so if I press the shortcut, then press backspace,
const object = {}
//should remain
我想这个 post 就是您要找的:
对于 mac 用户,简短的回答是:
使用ctrl
+ shift
+ →
来扩展大括号或标签之间的选择,
使用 ctrl
+ shift
+ ←
缩小大括号或标签之间的选择。