Keyboard shortcut to select text inside quotes in Visual Studio 2012

Viewed 13603

Is there a keyboard shortcut (or customizable keyboard shortcut) to select text inside a single quote '' and double quotes "" in Visual Studio 2012.

eg:

string name = "John Doe";

instead of dragging the mouse to select all of John Doe, is there a way to just point the cursor inside the double quotes and press a key combination to select it? Wanting to avoid usage of mouse a much a possible.

I found a similar question

Visual Studio / R# Keyboard shortcuts: select string with or without quotes

but the shortcut given will only select a particular text, not the entire text inside quotes

TIA

8 Answers

TLDR; CTRL+W+W


I am using visual studio 2017 with ReSharper. I don't know if it is ReSharper that added the command or if it is native to VS2017 but using my set-up it is possible to select the text within quotes by putting the cursor in between the quotes and hitting CTRL+W+W

The first CTRL+W will select the word closest to the cursor. Hitting W again will select everything between the quotes.

As of VS2019, with the cursor inside the string, ALT+SHIFT+= will select the whole string, including the surrounding quotes.

Related