34
votes

In JetBrains PhpStorm, what is the keyboard shortcut to select the current word? (I mean the word where the cursor is)

7

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
36
votes

Ctrl + W selects the current word.

12
votes

^+G it should work across all JetBrains IDEs

5
votes

If you have CamelHumps enabled, Alt + J will be your friend.

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).

0
votes

On Linux. Select next word: Ctrl+Alt+J Select all occurrences of word: Shift+Ctrl+Alt+J