In JetBrains PhpStorm, what is the keyboard shortcut to select the current word? (I mean the word where the cursor is)
34
votes
7 Answers
38
votes
Yes there is but it's different from one IDE to another, And here are 3 examples:
- SublimeText: Selection -> Expand Selection to Word (The shortcut will be shown next to it according to your OS)
- PhpStorm: Edit -> Extend Selection (The shortcut will be shown next to it according to your OS)
- MAC Extended Selection Shortcut: ⌥ + ↑
- MAC Shrink Selection Shortcut: ⌥ + ↓
- MAC Select all occurrences: ˄ + Command + G
- Visual Studio Code: Selection -> Add Next Occurrence (The shortcut will be shown next to it according to your OS)
- MAC Add Next Occurrence: Command + D
- MAC Select All Occurrences: Shift + Command + L
0
votes
to select the current word in Php storm (if you're using Windows) you can use ctrl+j
you can change it from: setting → keymap → click the search icon next to the search filed(search by keyboard shortcuts) → type ctrl+j → find "Add Selection for Next Occurrence" and change the keyboard shortcut of that as you want
0
votes
For the people that comes here in search of a way to just delete the word you are in the middle of, you can use ctrl+del+backspace (combining the two shortcuts ctrl+del / ctrl+backspace).
This deletes from the cursor to the beginning of the word (ctrl+ backspace) and then from the cursor to the end of the word (ctrl+del).