Make Visual Studio understand CamelCase when hitting Ctrl and cursor keys

后端 未结 7 1988
抹茶落季
抹茶落季 2020-11-28 20:34

Is there a way that I can configure Visual Studio 2008 to understand CamelCase? Specifically, I\'d like to be able to get Ctrl + right or

7条回答
  •  伪装坚强ぢ
    2020-11-28 21:21

    If you have ReSharper installed you can also configure Visual Studio keyboard shortcuts "Alt-Right" and "Alt-Left" for CamelHump, without losing standard Visual Studio behaviour for "ctrl-right" and "ctrl-left".

    1. Open the Visual Studio Options window from Tools –> Options
    2. Expand Environment and scroll down to Keyboard
    3. In Show commands containing box, type "hump". This will show all commands related to CamelHumps.
    4. Map the commands to the key mappings you wish by selecting the command from the list and entering the key mapping in the Press shortcut keys textbox, then click Assign.

    Caveats:

    • Assign the mappings for Text Editor, not Global.
    • Make sure the Use CamelHumps option from Resharper -> Options -> Editor -> Editor Behaviour is turned off.

    Details here: http://davidrcook.wordpress.com/2009/11/05/working-with-camel-case-in-visual-studio/

提交回复
热议问题