views:

201

answers:

3

I've found the setting for Camel Humps in resharper:

Resharper -> Options -> Editor -> Use CamelHumps

The problem is that I would still like to be able to use the normal selection mode (i.e. the default behaviour for CTRL+Arrow and CTRL+SHIFT+Arrow) as well as the CamelHumps mode.

For example consider this variable:

private int MyVeryLongCamelCaseName;

Now if I want to copy the entire variable then I want the VS default behaviour for CTRL+SHIFT+Left-Arrow which is to select the entire variable if the cursor is on the M.

However if I want to change the name to say MyExtremelyLongCamelCaseName then I would like the CamelHumps behaviour provided by Resharper.

Is there any way to have both behaviours with different shortcuts?

A: 

I don't think there is an option for this but as a work around you can use the Extend Selection shortcut which is CTRL+ALT+Right. Not ideal but faster than hitting CTRL+SHIFT+Right multiple times for a symbol that has a lot of camel humps.

Jonathan Parker
A: 

I think ctrl+W shotkey will help.

comrade
+3  A: 
  • disable CamelHumps in Resharper -> Options -> Editor -> Use CamelHumps.
  • go to Tools -> Options -> Keyboard and
    • bind the keys you want to 'Resharper.HumpNext' and 'ResharperHuntPrev' (I use alt+left / alt+right)
    • and bind keys to 'Resharper.HumpNextExtent' and 'Resharper.HumpPrevExtent' for selection shortkeys. (I had to remove keybindings for shift+alt+left/right from 'Edit.Char[Left/Right]ExtentColumn' first)
Ronan
It's in the same place on 5.x. I couldn't find it to save my life the other day, thanks :)
CubanX

related questions