What hotkey or command helps to select the whole word under the cursor in VSC? (Like CTRL or ALT + D in ST3)
How to select whole word under the cursor in Visual Studio Code?
Asked Answered
To select the word under the cursor in VSCode: ctrl + d
On Mac it's Cmd-D (because Ctrl-D deletes the char to the right) –
Hygro
is there ability to select by word for statements contains few words ? –
Capstan
Or Shift+Alt+Right Arrow (if you are at the head of the word) on windows –
Foreyard
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.
Another simple way is to double click
the mouse left button.
© 2022 - 2024 — McMap. All rights reserved.
fooBar
orfoo_bar
, then see #76082273 and a newsmartSelect
setting coming in vscode v1.80. – Banneret