Gedit plugins for everyone

439

Author: Bruce Byfield

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.)

Categories:

  • Desktop Software
  • Tools & Utilities