This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Desktop Software

Gedit plugins for everyone

By Bruce Byfield on June 23, 2008 (9:00:00 AM)

Share    Print    Comments   

If you drift between distributions, one of the first things you might notice is that Gedit, GNOME's text editor, is not always the same on each system. For instance, in Debian, Gedit is a relatively simple text edit, while in Ubuntu, it sprouts features that Debian users may never have seen. The difference is the plugins that each distribution packages with Gedit and enables by default. Many of these plugins make only small alterations by themselves, but enable a dozen or more and you'll find Gedit transformed almost out of recognition, regardless of whether you are using it to write code or plain text.

Extension series

Some Gedit plugins come standard in Gedit, although your distribution may not enable them by default. Others are available in the Gedit-Plugins package carried by many distributions. Still others are unofficial and available separately, and you must add them to the ~/.gnome2/gedit/plugins directory in your home directory.

Regardless of how you get a Gedit plugin, you need to enable it in Edit -> Preferences -> Plugins and restart Gedit before you can use it. Some plugins will be visible immediately because they make a change to the editing window, but you will need to search for others. The Edit and Tools menus are likely places, but you may need to check every option in the View menu before you can find some plugins.

Interface mods and insertion lists

The plugins you are likely to notice first are those that enhance the interface. Two of the most visible add tabs to the bottom pane: Python Console, which helps convert Gedit into a Python development environment, and Embedded Terminal, which adds an instance of the GNOME Terminal, complete with all your modifications.

Other plugins add tabs to the side pane. File Browser adds a cramped but serviceable directory tree to the side pane. Similarly, the Character map plugin squeezes a choice of language and a table of special characters into the side pane, although, since the table has only five glyphs per row, you need to be prepared to do some scrolling. You can also use Tag list to add a display of markup tags to the side pane that range from HTML and XHTML to LaTeX and XUL into the current document; conveniently, you toggle a Preview pane in the side bar as well, to check that you have chosen the correct tag.

Besides Character map and Tag list, several other plugins are useful for automatic insertions. From the Edit menu, you can use Insert User Name to add the name of the current account at the cursor's position, or Insert Date and Time to add information in either one of several dozen standard formats or in a custom one of your own choosing. Even more elaborately, you can go to Tools -> Manage Snippets to create autotext for insertion, or to add a keyboard shortcut that will enter the snippet without your having to type it out in full. Manage Snippets installs with dozens of snippets, mostly for coders, but you can also add your own if you are using Gedit for other purposes, such as typing plain text.

Developers, writers, and third parties

As you might expect, several plugins are aimed at developers, such as Bracket Completion, Comment Code, Join/Split Lines, and Indent Lines, all of which are available as items in the Edit menu. In the Tools menu, developers can also customize External Tools. External Tools installs with several presets, including Build, Remove trailing spaces, and Run command, and you can extend the plugin with your own customizations, specifying not only commands, but the shortcut keys to activate them, and where input and output display, such as the Shell Output tab in Gedit's bottom pane.

If you are producing plain or HTML text, other plugins help make Gedit as useful for you as it is for a developer. One of the plugins that is enabled by default in most distributions is Spell Check, which includes an autocheck option. If you are concerned about length, Document Statistics will give you a breakdown of your document in lines, words, characters, and bytes. You can also change the case of selected text, or sort lines and columns, removing duplicates as you go.

Moving beyond the official plugins, you will find even more to choose from in the third-party options. Many of these third-party plugins push Gedit even closer to word processor status than the official ones. For example, you can choose to add an HTML Tidy plugin to clean up your HTML, or turn Gedit into a LaTeX editor with another plugin. Other third-party plugins allow for word completion, the use of templates, and a split view that is useful for document comparison.

Conclusion

Like applications such as Firefox and OpenOffice.org, Gedit benefits greatly from throwing the program open to plugins. The one weakness of this approach is that the choice of where you access plugins from is arbitrary -- for instance, there is no particular reason that Tag list should be accessible from the side pane, while Manage Snippets should be in the Tool menu.

However, if you can stomach some interface randomness, Gedit plugins are worth the time you spend investigating them. You have a strong chance of finding several features you've been wanting, and you may never see or use Gedit in quite the same way again.

Every Monday we highlight a different extension, plugin, or add-on. Write an article of less than 1,000 words telling us about one that you use and how it makes your work easier, along with tips for getting the most out of it. If we publish it, we'll pay you $100. (Send us a query first to be sure we haven't already published a story on your chosen topic recently or have one in hand.)

Bruce Byfield is a computer journalist who writes regularly for Linux.com.

Share    Print    Comments   

Comments

on Gedit plugins for everyone

Note: Comments are owned by the poster. We are not responsible for their content.

not gnomes, trolls

Posted by: Anonymous [ip: 74.130.75.143] on June 23, 2008 03:59 PM
Gnomes are little men who live in the forest, in Central Europe. They are closely related to Leprecauns (Irish) and Kobolds (miners).
Trolls are shiftless, ugly cannibals living under bridges, and witless ignorant loudmouths, like you.

#

Re: not gnomes, trolls

Posted by: Anonymous [ip: 71.80.174.125] on June 24, 2008 05:53 AM
You forgot to mention that gnomes also have a partially complete business model that includes the relocation of undergarments for profit.

#

Gedit as IDE

Posted by: Anonymous [ip: 65.120.181.2] on June 23, 2008 04:27 PM
Thank you for this article! No one seems to understand how I used Gedit as a Java IDE for two years after experiencing some disconcerting instability with everyone else's favorite IDE (Eclipse). With syntax highlighting, a couple of build shortcuts, a terminal and a few other plugins, Gedit was actually a great dev environment!

#

Gedit plugins for everyone

Posted by: Anonymous [ip: 78.32.109.170] on June 23, 2008 06:50 PM
I use Gedit for all of my text editing and programming alike. Gemini and Snippets are the essential plug-ins in my mind. Also, enabling automatic indentation in the Editor settings, Line Numbers, Bracket Matching and Highlight Current Line in View settings also helps.

Simplest is usually best IMHO. Just add a plug-in system and you're sorted :)

#

Gedit plugins for everyone

Posted by: Anonymous [ip: 170.149.100.10] on June 23, 2008 08:31 PM
For KDA, there is also the very nice Kate (kate.kde.org). I even wrote a (cross-editor) program called Snippits to duplicate the Gedit/Vim/TextMate functionality: http://ben.kudria.net/code/snippits

#

Re: Gedit plugins for everyone

Posted by: Anonymous [ip: 91.103.27.158] on July 08, 2008 04:08 PM
no am animal :-)

#

Gedit plugins for everyone

Posted by: Anonymous [ip: 87.160.253.10] on July 08, 2008 09:33 PM
Hi,

i created a External Tools Plugin Snippets Collection at the Gnome Wiki:
http://live.gnome.org/Gedit/ExternalToolsPluginSnippets
This is another great powerup for your gEdit.

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya