Anton
Anton

Reputation: 576

How to select whole word under the cursor in Visual Studio Code?

What hotkey or command helps to select the whole word under the cursor in VSC? (Like CTRL or ALT + D in ST3)

Upvotes: 18

Views: 12687

Answers (3)

Hao Liu
Hao Liu

Reputation: 123

Another simple way is to double click the mouse left button.

Upvotes: -4

VonC
VonC

Reputation: 1329642

Note: the definition of a "word" is different when your document edited with VSCode is a markdown one.

That is why VSCode 1.52 (Nov. 2020) proposes:

Markdown inline smart select

Expand and shrink selection in Markdown documents using the following commands:

  • Expand: kb(editor.action.smartSelect.expand)
  • Shrink: kb(editor.action.smartSelect.shrink)

Selection applies to italics, bold, inline code blocks, and links.

Smart select within a Markdown document expands from the content within an inline markdown type to include the markdown symbols. -- https://media.githubusercontent.com/media/microsoft/vscode-docs/d603cc2985b623b6c297c757b196df6c4171e892/release-notes/images/1_52/inline-markdown-smart-select.gif

Upvotes: 4

Gary
Gary

Reputation: 909

To select the word under the cursor in VSCode: ctrl + d

Upvotes: 27

Related Questions