Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In visual studio how to select word in text editor using keyboard

In earlier version of Microsoft Visual Studio products if user in text editor hit CTRL+W editor will do select the word where is pointer. Does that keyboard shortcut exists still in Visual Studio 2010?

like image 817
adopilot Avatar asked Aug 08 '10 09:08

adopilot


People also ask

How do I select a word in Visual Studio?

Bookmark this question. Show activity on this post. In earlier version of Microsoft Visual Studio products if user in text editor hit CTRL+W editor will do select the word where is pointer.

How do you select a word using the keyboard in VS Code?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.

How do you select words with keyboard?

Hold down the "Ctrl" key and the "Shift" key. Press the right arrow key to select the word to the right, or press the left arrow key to select the word to the left. Select one character at a time by holding down the "Shift" key and and using either arrow key (right or left).

What is Ctrl K in Visual Studio?

Ctrl+K for Removing Bookmarks Visual Studio contains a characteristic that enables users to add a bookmark. This bookmark can be added to a line of code in a solution.


3 Answers

In Tools | Options | Environment | Keyboard enter "Word" into "Show commands containing" and see all commands associated with words.

Here the command Edit.SelectCurrentWord is assigned to Ctrl + W, but your setup might be different. Ctrl + Shift + W is another common setting.

like image 70
Richard Avatar answered Oct 06 '22 13:10

Richard


When using Resharper 'Shift + Ctrl + W' shortcut may be overriden and not working. Create new shortcut for Edit.SelectCurrentWord as 'Ctrl + W, Ctrl + W'. It works fine so you may use this and resharper shortcuts.

like image 41
wxt Avatar answered Oct 06 '22 13:10

wxt


In Visual Studio 2019 the default keypress to select a word is:

Ctrl + Shift + W

enter image description here

like image 25
Chris Catignani Avatar answered Oct 06 '22 14:10

Chris Catignani