【发布时间】:2021-09-17 09:50:22
【问题描述】:
所以我在 GitHub 上找到了this issue,它讨论了按代码块/段落进行光标导航。是否有相关的功能可以同时从当前光标位置选择到下一个块的结尾或开头?
【问题讨论】:
标签: visual-studio-code navigation textselection
所以我在 GitHub 上找到了this issue,它讨论了按代码块/段落进行光标导航。是否有相关的功能可以同时从当前光标位置选择到下一个块的结尾或开头?
【问题讨论】:
标签: visual-studio-code navigation textselection
可以通过在链接的 GitHub 问题中描述的键绑定中将 "select": true, 添加到 "args" 列表来完成选择。所以最终的结果应该是这样的(将shift添加到键绑定中以将其与段落导航命令区分开来):
{
"key": "ctrl+shift+down",
"command": "cursorMove",
"when": "editorTextFocus",
"args": {
"to": "nextBlankLine",
"by": "wrappedLine",
"select": true,
}
},
{
"key": "ctrl+shift+up",
"command": "cursorMove",
"when": "editorTextFocus",
"args": {
"to": "prevBlankLine",
"by": "wrappedLine",
"select": true,
}
}
【讨论】: