• Login
Community
  • Login

Select Word

Scheduled Pinned Locked Moved General Discussion
6 Posts 4 Posters 2.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    Tolken Sak
    last edited by Mar 24, 2019, 12:20 PM

    Please, make a function that select the word under the cursor. Many other editors already have this function.

    A 2 Replies Last reply Mar 24, 2019, 1:50 PM Reply Quote 0
    • A
      Alan Kilborn @Tolken Sak
      last edited by Mar 24, 2019, 1:50 PM

      @Tolken-Sak

      Ummm…double click the word with the mouse?

      1 Reply Last reply Reply Quote 3
      • A
        Alan Kilborn @Tolken Sak
        last edited by Mar 25, 2019, 1:22 AM

        @Tolken-Sak

        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.

        1 Reply Last reply Reply Quote 1
        • G
          guy038
          last edited by guy038 Mar 25, 2019, 2:08 AM Mar 25, 2019, 2:07 AM

          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

          A 1 Reply Last reply Mar 25, 2019, 1:56 PM Reply Quote 3
          • A
            Alan Kilborn @guy038
            last edited by Mar 25, 2019, 1:56 PM

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

            1 Reply Last reply Reply Quote 2
            • P
              PeterJones
              last edited by Mar 25, 2019, 5:23 PM

              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.

              1 Reply Last reply Reply Quote 3
              • A Alan Kilborn referenced this topic on Aug 9, 2024, 3:02 PM
              2 out of 6
              • First post
                2/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors