Ctrl + Shift + L to select all occurrences of current selection.
Alt+Enter --> Select all matches.
On Mac OS: Cmd+D
On Windows & Linux: Ctrl+D
Above solved the purpose for me.
But ⌘D is defined as "editor.action.addSelectionToNextFindMatch"
, so if you press it more than once, it will try to search and select same word in the file which then can be used to do "multi word editing"
.
You are looking for Shrink/Expand Selection.
Trigger it with Shift+ Alt+Left and Shift + Alt+Right
Update:
This is now called Smart select API. This feature uses semantic knowledge to intelligently expand selections for expressions, types, statements, classes, and imports.
If you want to ctrl+w
to behave the same as in Idea just go keyboard settings
Search for Expand selection
. Set new shortcut cmd+w
or ctrl+w
depending on your OS.
Also re-bind other commands that use ctrl+w
to use another shortcut that you want, for example cmd+f4
You can edit keybindings.json to avoid using UI.
It is Ctrl + D that works for me in latest Visual Studio Code on Windows.
Go to File -> Preferences -> Keyboard shortcuts, you will find this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With