Community
    • Login

    double-click hyphen

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    double-clickhyphen
    4 Posts 2 Posters 3.4k Views 2 Watching
    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.
    • Andrew YushkovA Offline
      Andrew Yushkov
      last edited by

      hi, how to select a word with a hyphen?

      .b-page__block
      

      only the “page__block” is released when you double-click

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Andrew Yushkov
        last edited by

        Hello Andrew,

        depending on the language scintilla defines chars which are part of the word or not.
        To manipulate this you could use python script and function editor.setWordChars like

        chars = editor.getWordChars() + “@#_()[]”
        editor.setWordChars(chars)
        

        which would mean, that the existing chars would be extended by @#_()[]. In your case you would add the hyphen.
        If you put this in startup.py it will be automatically added each time you start npp.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Andrew YushkovA Offline
          Andrew Yushkov
          last edited by

          Thank you, the script added startup.po but it OPERATE only the current tab, how to do so when you open a new tab to run this script?

          1 Reply Last reply Reply Quote 0
          • Claudia FrankC Offline
            Claudia Frank
            last edited by

            Hello Andrew,

            I described here how it could be solved.
            Basically, you need to register a callback which gets called when you open a new tab or switch tabs and extend the wordchars accordingly.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors