Search code examples
keyboard-shortcutsvisual-studio-code

Shortcut key for selecting a word and extending the selection in VS Code


In VS with Resharper, there's the command ctrlw that will select the whole word at cursor and then, when pressed repeatedly, extend the selection to the brackets, then include them too, then to the next outer brackets etc.

What is the name of the command for that in Visual Studio Code?


Solution

  • The shrink/expand selection commands should be what you are looking for. The command names are editor.action.smartSelect.grow (default keybinding shift+alt+right) and editor.action.smartSelect.shrink (default keybinding shift+alt+left).