gedit plugins: What they are and how to use them

gedit plugins: What they are and how to use them


In my last article, I talked about using the powerful gedit text editor. But no program is perfect, mainly because too many features imply too much bloat. That's where gedit's plugins come into play. In this article, I'm will explain how to install and use some of my favorite gedit plugins.

Shipped Plugins

gedit (the Ubuntu edition) comes with a whopping 13 plugins. My favorite is definitely External Tools. As I noted in my previous article, you can run any program under the sun using the file that you're editing as a parameter. While External Tools comes with a bunch of handy programs pre-installed, it's so much more fun if you add your own. Open up External Tools: go to Edit→Preferences, click on the Plugins tab, select External Tools, and click Configure. You will be able to come back to this screen through Tools→External Tools. I'll explain how to create a plugin that will open Frozen-Bubble, the popular game. (We don't want programmers dying from stress, do we?). If you don't have Frozen-Bubble installed, then I urge you to run the command sudo apt-get install frozen-bubble (or to install Frozen-Bubble through Synaptic's interface). First of all, hit the big New button in the External Tool configuration window, and name it Frozen-Bubble (or whatever you want to call it). Type in a description (Stress Reliever is what I put in). Then click inside "Shortcut Key" and type in your hotkey (though this is optional). Under command, type in the command you want to run for this new script (for example, frozen-bubble). Now, hit close and run your script from Tools→Frozen-Bubble. Your favorite game will now launch.

Another really great plugin is Snippets. It inserts little "snippets" of text into your file. It's really handy for inserting weird characters (like "→", demanded by Free Software Magazine's editors!) or commonly used phrases (like often used loops or variables).

Once activated, open the configuration: click on Edit→Preferences, then choose on the Plugins tab, select Snippets, and click Configure. Then hit the "New" button. As before, name it (I'll call it because that's what it'll insert). The "Edit" field is the area where you put what will be inserted at the hotkey (for my example, ). Then add a shortcut key (for me, Ctrl -) and hit close. Test it out by hitting your shortcut combination.

gedit-plugins Plugins

gedit has quite a few more official plugins, but unfortunately they're not all shipped with gedit. Luckily, it's easy to get them. Just look in your distribution's package manager for gedit-plugins or something similar. You can also get the source from the GeditPlugins page.

One of my favorite extra plugins is Color Picker. Unlike External Tools and Snippets, you don't need to configure it. Instead, you can simply enable it (Edit→Preferences, click the Plugins tab, and check Color Picker) and then launch it from Tools→Pick Color (yes, I did insert that "→" using the Snipset plugin!). You can use the color dropper to pick a color or find one yourself. Once you found a nice one, hit the Insert button to add the hexadecimal color code into your document. Very handy.

Another handy one is Embedded Terminal: it's a plugin similar to what ships with Kate (the KDE Advanced Text Editor). You need to first make sure the bottom pane is on (CTRL-F9 or View→Bottom Pane). Then, enable it by running Edit→Preferences, clicking on the Plugins tab, and checking Embedded Terminal. Now, you have a full Bash terminal at your disposal.

Lastly, there's the one that in my opinion should have been in gedit long ago. See, not all of us won first place at the fifth grade spelling bee. That's why the Spell Checker plugin was created. Just enable it (Edit→Preferences, Plugins tab, check Spell Checker) and run it from Tools→Check Spelling (or Shift F7) and a spelling checker will pop up.

Unofficial Plugins

Obviously, not every single plugin in the world is built into the gedit-plugin package. Therefore, the gedit developers put together a page with a list of all the known gedit plugins. Since reviewing them would be an article in of itself, I chose to review my two favorites.

Almost every web developer out there has used HTML Tidy. It's a little tool that will check and fix up your (X)HTML and XML code. There is an unofficial gedit plugin to integrate Tidy into your program. Instructions for installing it are available at the gedit-tidy web site. You'll need HTML Tidy installed as well. Search your repositories for the package tidy or download it from the Tidy homepage. Once you've done that and enabled it (Edit→Preferences, click on the Plugins tab, and check Tidy), run Tidy on an (X)HTML or XML document with Tools→Tidy Check. This will give you a list of warnings that your web page has (you need to make sure the bottom panel is enabled). You can automatically fix them using Tools→Tidy.

The other plugin I love is the gedit Template plugin. After installing it (follow the instructions at the homepage), create a folder called "templates" in ~/.gnome2/gedit/. Then, create a template (like a blank HTML file) and save it in ~/.gnome2/gedit/templates/. Finally, enable the plugin by clicking Edit→Preferences, going to the Plugins tab, and checking Template. Now, whenever you want to create a file from a template, create one using File→New From Template. You can download a bunch of templates from this gedit template site.

Category: 
Tagging: 

Author information

Andrew Min's picture

Biography

/ˈændruː/ /mi:n/
(n): a Christian.
(n): a student.
(n): a technology enthusiast.
(n): a journalist for several online publications.

Andrew Min is a student, programmer, and journalist from New York City.

My main forte in the technology realm is journalism. I’ve written for a variety of magazines, both print and non-print, with a focus on open source software and the new web. I’ve also been interviewed on a long list of topics, ranging from politicians on Twitter to open source software and homeschooling.

I also have experience with a variety of programming languages (Bash, Batch, CSS, JavaScript, PHP, and (X)HTML) and content management systems (WordPress). I’ve been hired to design and administer several websites. In addition, I’ve been the lead programmer on several small coding projects.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!