Start browser URL with selected text?
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?
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.
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-12345portion of the text, then click a toolbar button. Notepad++ should then match
DEV-12345against a list of regular expressions, if one matches, then insert
DEV-12345into the querystring of a URL that corresponds to that regex. Then, it launches the default browser with that completed URL.
dinkumoil last edited by
Yes, there is an easy way.
(menu) Edit -> On Selection -> Search on Internet.
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. :)
dinkumoil last edited by
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.
Do you have enough now to get you started, or would you like a Pythonscript kickstarter for your problem?
Thanks, Everyone. I think I’ve got enough clues to start my journey. You’ve been most helpful.