NotePad++ shortcut for selecting whole word

I couldn't find a built-in command to do this, but I found a way to replicate this functionality.

  1. Open or create any text file with more than one word in it.
  2. From the Macro menu, select Start Recording.
  3. Press Ctrl+← Left. The caret (insertion point/I-beam) will move to the beginning of the word.
  4. Press Ctrl+Shift+Right →. The word will be highlighted.
  5. From the Macro menu, select Stop Recording.
  6. Again from the Macro menu, select Save Current Recorded Macro.
  7. In the box that appears, assign any name you would like, and select a keyboard shortcut for it. Then click OK.

Your assigned shortcut will now highlight the word the caret is currently inside, except for when the caret is immediately to the left of the first letter of the word, in which case it will select the previous word.

If you need to be able to select a word when the caret is immediately to the left of the word, perform the above steps but alternate the left and right keys, so the caret moves to the right of the word and highlights to the left. In that case it would select the following word if the caret is immediately to the right of the word. You can create shortcuts for both if you desire.

I would hope there's a better way, but I couldn't find one. If someone else knows of one, feel free to provide it and downvote this answer.


Might be a better way (and there may be unintended side-effects of this), but from poking around a bit:

Settings, Shortcut Mapper, Plugin Commands, 49 Q:Mark Word or Find Reverse, Modify, then Choose your Shortcut Combination.

Note that Ctrl-W is close by default in Notepad++, so unmap that first (Shortcut mapper, Main Menu) if you want to use that.

Edit: After ten more seconds of poking around, the crippling unintended side-effect of this solution is somewhat obvious. Namely, try this is a test test and then try select test. ;) Sorry.


I use autohotkey to achieve the same goal. The combination was Ctrl+F+Esc

Ctrl+F select the current word for you, Esc dismiss the Find window.

And it did the trick.

(In SourceInsight there was a default action for this, very useful :)