【发布时间】:2016-11-14 16:37:54
【问题描述】:
由于this question 是针对“大”Visual Studio 和 Resharper,我也希望在 VS Code 中看到该功能。
滚动浏览 VS Code 的 shortcut list,我找不到它,但我希望它仍然存在,但称为不如 camel 直观的东西,hump 之类的。
【问题讨论】:
标签: keyboard-shortcuts visual-studio-code camelcasing
由于this question 是针对“大”Visual Studio 和 Resharper,我也希望在 VS Code 中看到该功能。
滚动浏览 VS Code 的 shortcut list,我找不到它,但我希望它仍然存在,但称为不如 camel 直观的东西,hump 之类的。
【问题讨论】:
标签: keyboard-shortcuts visual-studio-code camelcasing
我发现这个扩展可以工作 https://marketplace.visualstudio.com/items?itemName=ow.vscode-subword-navigation
有趣的是你需要单独配置每个组合:
{
"key": "alt+left",
"command": "subwordNavigation.cursorSubwordLeft",
"when": "editorTextFocus"
},
{
"key": "alt+right",
"command": "subwordNavigation.cursorSubwordRight",
"when": "editorTextFocus"
},
{
"key": "alt+shift+left",
"command": "subwordNavigation.cursorSubwordLeftSelect",
"when": "editorTextFocus"
},
{
"key": "alt+shift+right",
"command": "subwordNavigation.cursorSubwordRightSelect",
"when": "editorTextFocus"
},
{
"key": "alt+backspace",
"command": "subwordNavigation.deleteSubwordLeft",
"when": "editorTextFocus"
},
{
"key": "alt+delete",
"command": "subwordNavigation.deleteSubwordRight",
"when": "editorTextFocus"
}
【讨论】:
json(缺少顶级属性),因此无法添加到User Settings。
keybindings.json。最简单的访问方式就是在命令搜索窗口中输入shortcuts。
如果由于某些原因您的绑定没有在此处设置是获取 Cezn 快捷方式的 json。
{
"key": "ctrl+alt+right",
"command": "cursorWordPartRight",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+shift+right",
"command": "cursorWordPartRightSelection",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+left",
"command": "cursorWordPartLeft",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+shift+left",
"command": "cursorWordPartLeftSelection",
"when": "editorTextFocus"
}
{
"key": "ctrl+alt+backspace",
"command": "deleteWordPartLeft",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+alt+delete",
"command": "deleteWordPartRight",
"when": "editorTextFocus && !editorReadonly"
}
小心使用 ctrl+alt+delete ,因为它与另一个流行的 Windows 快捷方式冲突。
其他有趣的绑定是:
{
"key": "ctrl+n",
"command": "explorer.newFile",
"when": "explorerViewletFocus"
},
{
"key": "ctrl+shift+n",
"command": "explorer.newFolder",
"when": "explorerViewletFocus"
}
【讨论】:
有一个扩展名:Camel Case Navigation
【讨论】: