Community
    • Login

    Start browser URL with selected text?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    8 Posts 3 Posters 947 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.
    • David-PatowD
      David-Patow
      last edited by

      Is there an easy way to select text in Notepad++, then start a URL in my default browser, including the selected text in the querystring of the URL? For bonus points, can it inspect the selected text (regex?), and decide which URL to invoke?

      Sorry, I looked around, but I just don’t see a way …

      If it’s not a built-in feature, is there a plugin that can do this?

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @David-Patow
        last edited by

        @David-Patow said:

        Is there an easy way

        Depends upon your definition of “easy”. For the most straightforward interpretation of “easy” the answer is “no”. ;)

        Getting away from “easy”, how about a scripting plugin? If you are familiar with Python, Notepad++ has a Pythonscript plugin, and it can probably do what your asking.

        Why don’t you provide a real example instead of just a general description. Take a sample piece of text with all the “stuff” in it, and describe what you’d envision happening with it.

        1 Reply Last reply Reply Quote 0
        • David-PatowD
          David-Patow
          last edited by

          Your suggestion of the Pythonscript plugin sounds like the best bet. I’ll go that route. Thanks!

          FWIW, you did ask for a better description …

          I’m looking for a way to easily bring up the browser-based Jira issue page for a Jira issue key that appears in my text files. There are several different formats for the keys (DEV-nnnnn, SUP-nnnnn, IFR-nnnnn), and some may point to a different Jira website.

          For example, when I am presented with text like this …

          // See: DEV-12345: Gadget allows invalid input values for flux cap
          

          I would like to be able to select the DEV-12345 portion of the text, then click a toolbar button. Notepad++ should then match DEV-12345 against a list of regular expressions, if one matches, then insert DEV-12345 into the querystring of a URL that corresponds to that regex. Then, it launches the default browser with that completed URL.

          Alan KilbornA 1 Reply Last reply Reply Quote 2
          • dinkumoilD
            dinkumoil
            last edited by

            @David-Patow , @Alan-Kilborn

            Yes, there is an easy way. (menu) Edit -> On Selection -> Search on Internet.

            Alan KilbornA 1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @dinkumoil
              last edited by

              @dinkumoil

              Given the OP’s expanded problem definition, I don’t think that easy way is going to be successful. But if you have familiarity with Jira issue numbers and what the OP is talking about doing, you could very well be right. :)

              dinkumoilD 1 Reply Last reply Reply Quote 2
              • dinkumoilD
                dinkumoil @Alan Kilborn
                last edited by

                @Alan-Kilborn

                Oh, I’ve missed that. Thought the second posting of @David-Patow only is about the Python Script plugin solution.

                Indeed, when it comes to regex-parsing the selected text there is no other way than a scripting plugin.

                1 Reply Last reply Reply Quote 3
                • Alan KilbornA
                  Alan Kilborn @David-Patow
                  last edited by

                  @David-Patow

                  Do you have enough now to get you started, or would you like a Pythonscript kickstarter for your problem?

                  1 Reply Last reply Reply Quote 2
                  • David-PatowD
                    David-Patow
                    last edited by

                    Thanks, Everyone. I think I’ve got enough clues to start my journey. You’ve been most helpful.

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