有没有办法在VS Code中通过方法名称启用驼峰驼峰?

Kon*_*ten 15 camelcasing keyboard-shortcuts visual-studio-code

由于这个问题适用于"大型"Visual Studio和Resharper,我想在VS Code中看到这个功能.

滚动浏览VS Code 的快捷列表,我找不到它,但我希望它仍然在那里,但称之为比驼峰,驼峰等更不直观.

cez*_*ezn 21

从版本1.25开始,这些命令内置于:

在此输入图像描述

  • 这应该更改为可接受的解决方案!谢谢。 (3认同)
  • 这是坚实的,您可以在没有alt键的情况下重新绑定它们,它就是完美的 (2认同)

Krz*_*zor 5

我发现这个扩展工作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"
}
Run Code Online (Sandbox Code Playgroud)

  • 此功能现已集成到应用程序中:无需插件,请参阅:/sf/answers/3593041861/ (2认同)