views:

405

answers:

3

There is a shortcut Ctrl+Shift+W to select the entire word at the current cursor position.

Is there a similar shortcut that keeps expanding the selected region every time I apply it?

I mean, is there a shortcut which

  • selects the word when applied once (same as Ctrl+Shift+W) and
  • selects the entire line when applied twice in a row and
  • selects the entire block when applied three times etc.,

i.e. keeps expanding the selected region step by step?

I remember seeing such a shortcut, but I don't remember whether it was for Visual Studio or some other editor.

+1  A: 

Please refer to the Text Selection section of this document.

http://msdn.microsoft.com/en-us/library/da5kh0wa.aspx#editors

Rire1979
+1  A: 

I noticed this "Triple Click" VS2010 add-on last time I searched through the add-on gallery. It's not quite what you're looking for (ie. it's not a hotkey and it won't select a block), but at least it will make it so that triple-clicking will select a whole line. If you're extra-adventurous, it comes with source.. so you could potentially extend the functionality and/or make it a hotkey yourself.

http://visualstudiogallery.msdn.microsoft.com/en-us/2bbdc70c-32f7-4b69-8cff-d8190cae0cc7

guesser
A: 

Solution 1

Finally, I figured it out: the shortcut is the numpad-plus key after installing CodeRush Express for Visual Studio.

Stack Overflow > CodeRush Tricks of the Trade > Answer by moobaa.

Solution 2

Or if you use, Resharper, it's the expand/shrink selection feature accessible via Ctrl+W.

Lernkurve