【发布时间】:2020-04-04 17:39:16
【问题描述】:
我已经尝试实现此功能很长时间了。我一直无法在网上找到答案。我想用 "Tab" 键做两件事。
- 如果光标在行首,我想缩进,或者
- 如果光标位于字符/字符串之间,则跳转到行尾。
[
{
"key": "ctrl+tab",
"command": "tab",
"when": "editorFocus && inputFocus && !editorHasSelection"
},
{
"key": "tab",
"command": "cursorEnd",
"when": "textInputFocus"
}
]
这些是 Eclipse 和 Intellij IDE 中的类似功能
【问题讨论】:
-
在 vs code 上安装 intellij ide 键盘映射扩展
-
你不能在没有扩展的 vscode 中做到这一点。没有可以指示行中位置的
when子句。我查看了 intellij ide 键盘映射扩展,但搜索tab显示没有go to the end of the line功能。
标签: visual-studio-code key-bindings