Search code examples
stringvisual-studio-2010resharperkeyboard-shortcuts

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


I have checked the questions with similar titles, and searched, but found nothing. But I swear I've seen someone do this before.

Say I have something like the following:

var mystr = "here is some text I want to select";

Is there a way to place the cursor caret within the string, then use a shortcut to select it without quotes? Another shortcut to select with quotes?

If this is available in ReSharper instead, what is the shortcut there?


Solution

  • You can use Ctrl + W (Extend selection) shortcut in Visual Studio. If you are in a word it will select the word, press again and it will select the string without the quotes, then the string with the quotes, then the statement, then the next logical element...