Select Word
-
Please, make a function that select the word under the cursor. Many other editors already have this function.
-
Ummm…double click the word with the mouse?
-
But if you are looking for something that can select the current word via a keycombination, I think that Notepad++ alone cannot do it. But you can do it via scripting. Let us know if you need that type of solution.
-
Hello, @tolken-sak, @alan-kilborn and All,
In order to select the current word, where cursor is located inside, you have to produce these two shortcuts, successively :
-
Ctrl
+Left Arrow
-
Ctrl
+Shift
+Right Arrow
Now, to get a single shortcut, for that selection, just create a macro, which will be executed by a user shortcut !
Best Regards,
guy038
-
-
@guy038 said:
where cursor is located inside
It’s actually the “caret”, but no matter… :)
So inside is rather key. I found that if you are right at the start of a word, this macro will select the word to the left of the desired word. Oh, well, nothing is perfect. :)
-
Looking at the Scintilla documentation, there’s SCI_MULTIPLESELECTADDNEXT, which says “If the current selection is empty then select word around caret”. Unfortunately, that’s not in the Settings > Shortcut Mapper > Scintilla Commands list. Looking at the Scintilla History, that command was added in Scintilla 3.5.7, but Notepad++ uses Scintilla 3.5.6: if Don had done one more update, that command could have been in the Shortcut Mapper. Sigh.
But @guy038’s macro-suggestion should be workable for you.
-