• Login
Community
  • Login

Select a path between words

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 170 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.
  • A
    ArkadiuszMichalski
    last edited by May 16, 2021, 3:33 PM

    Can someone point me how we can select a path between the words? Some examples:

    word1 C:\te|st\name word2
    C:\te|st\name word2
    C:\te|st\name word2
    

    Char | indicates the position of the cursor. When I click on test only test was selected, next click select the entire line. I need select only path C:\test\name but without making a precise selection by myself. If anyone has an idea how to do it in NPPExec, it would be even better.

    P 1 Reply Last reply May 16, 2021, 5:36 PM Reply Quote 0
    • P
      PeterJones @ArkadiuszMichalski
      last edited by May 16, 2021, 5:36 PM

      @ArkadiuszMichalski ,

      The three levels of single-click, double-click, and triple-click select single caret position, current word, and whole line.

      The way to get the behavior you want is to change teh definition of “word”, which you can do by setting Settings > Preferences > Delimiter > ☑ Add your characters… = :\

      I know there have been PythonScript examples of highjacking double-click as well (using the scintilla notifications and callbacks), so if you didn’t want to change the definition of “word” you could solve it another way. NppExec can do a lot, but I don’t think it can handle the notification callbacks. NppExec might be able to create a script that goes from the current position, and searches both forward and backward until it hits a space in either direction – but I usually think of NppExec as more of a batch-scripting, for interacting the entire contents of the file with external programs, and think of character-based as something better suited for PythonScript or similar, so I’m not sure how I would go about solving that problem in NppExec.

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors