I'm looking for a keyboard shortcut to quickly open links in a text file with a Web browser. Is there a trick or a plugin out there?
You can do this with the External Tools Plugin that ships with Gedit. Select Tools > Manage External Tools. Create a new tool by clicking the little + icon in the lower-left and name it "Open Link" (or whatever you want). Use the following code within the Edit box (assuming you're using Firefox):
#!/bin/sh
xargs -I '{}' firefox '{}'
Then specify your shortcut key and make sure the Input is set to Current word. You can now open a link if the cursor is anywhere in the word (the URL) by choosing Tools > External Tools > Open Link or using your keyboard shortcut.
I use Jean-Philippe's Open URI Context Menu plugin. It doesnt have a shortcut key but uses a simple right-click to open the link.
Just upgraded to Gedit 2.8 and version 2 of this plugin is way faster now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With