Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can gedit open links in a Web browser by clicking on it?

Tags:

gedit

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?

like image 507
egon Avatar asked May 13 '12 14:05

egon


2 Answers

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.

like image 125
Micah Carrick Avatar answered Sep 19 '22 08:09

Micah Carrick


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.

like image 22
ezraspectre Avatar answered Sep 22 '22 08:09

ezraspectre