Is there a shortcut for selecting word under cursor in Sublime Text, Atom
Solution 1:
command+d on OSX
control+d on Windows/Linux
You can find all the default keybindings by going to Preferences > Keybindings - Default
and perusing the list.
Solution 2:
You can add a key binding to select the word:
{ "keys": ["ctrl+shift+w"], "command": "expand_selection", "args": {"to": "word"} }
Unlike the find_under_expand
command (control+d
by default) repeated presses won't add cursors at matching words.
Solution 3:
install ExpandRegion if you want to expand the selection:
- Expand selection to word
- Expand selection to quotes (content only)
- Expand selection to quotes (with quotes)
- Expand selection to complete self closing tag
- Expand selection to parent node content
- Expand selection to complete node
- Expand selection to parent node content