有没有办法通过 VS Code 中的方法名称启用骆驼驼峰?
Is there a way to enable camel humping through method names in VS Code?
由于 this question 适用于 "big" Visual Studio 和 Resharper,我也希望在 VS Code 中看到该功能。
滚动浏览 VS Code 的 shortcut list,我找不到它,但我希望它仍然存在,但调用的东西不如 camel 直观, 驼峰之类的。
我发现这个扩展可以工作 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"
}
从 1.25 版开始,这些命令内置于:
如果由于某些原因您的绑定没有在这里设置是json获取Cezn的快捷方式。
{
"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
由于 this question 适用于 "big" Visual Studio 和 Resharper,我也希望在 VS Code 中看到该功能。
滚动浏览 VS Code 的 shortcut list,我找不到它,但我希望它仍然存在,但调用的东西不如 camel 直观, 驼峰之类的。
我发现这个扩展可以工作 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"
}
从 1.25 版开始,这些命令内置于:
如果由于某些原因您的绑定没有在这里设置是json获取Cezn的快捷方式。
{
"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