Plugins Bring Vanilla Gedit a Spicy Kick

by Ostatic Staff - Mar. 23, 2009

Many people are surprised to find that with all the writing I do, hardly any is done with a traditional word processing application. Between smart quotes, file extension quirks, and publications and websites having slightly different formatting requirements, I find it's quicker and easier to use a text editor.

The two computers I use most run Linux -- the laptop runs Ubuntu, while the desktop is a "distribution nomad" that changes frequently. One great thing about Linux is that the platform has no shortage of capable text editors. Some lend themselves more to writing code and heavy-duty programming than others (such as Vim and Emacs) while others straddle the plain text document/programming editor line.

Lately, primarily because I've been slow to install my usual cross-over text editor of choice, Geany, I took a closer look at the plugins available for GNOME's "came with the desktop" editor, Gedit. The default plugins (and those found in the "extra" packages) make the plain vanilla editor far more appealing and useful for hardcore writers and casual programmers alike.



Snippets


Some text editors have features similar to Gedit's "Snippets" built right in. Snippets stores your frequently used tags or bits of text and enables you to insert them by entering a few characters with tab completion, or with a customizable hotkey combination. The decision not to activate this plugin by default (though it is included in Gedit's "stock" plugins) is understandable -- this isn't the kind of utility everyone will use.



I do a lot of writing that requires HTML tags, and I often need to include CSS class information to make the formatting look and behave as expected. It's not a big deal until I have had to type (or cut and paste) the same "class=" information five or ten or fifteen times in the same document. Snippets rescued me from the Ctrl-C, Ctrl-V cycle. Snippets features preset codes (with preset tab completions and hotkey combos that can be modified) arranged by language, as well as a "Global" heading that lets you enter custom codes, tags, and text that you use frequently.


Character Map and Tag List


Character Map is a plugin found in the "gedit-plugins" package. It's an additional package that can be found in most distribution repositories and installed in your distribution's customary manner. Tag List is included as a "stock" plugin.

I've grouped these two plugins together thanks to their similarities, and because Tag List complements Character Map nicely. Once activated, you need to make the side pane visible (on the View menu, click Side Pane), and the tabs on the bottom of the pane will show the character map icon (á) and a plus sign.



Character map simply allows you to insert special characters into your document (from Latin characters to Cherokee and Cuneiform symbols). It displays them as is -- no coding is involved.

Appearing as is is fine in some settings, but often, the characters require special tagging to display on web pages. The Tag List pane features an HTML-Special Characters menu option, and clicking the desired symbol will insert the code in your document.


Color Picker


One of the more "generalized" developer plugins is the Color Picker. It's the ubiquitous eye dropper and color palette/wheel dialog, that, once you've chosen your color, inserts its hex code in your document. Not an every day utility, but quite handy when it comes to finding the appropriate hex code for a color (and determining what it will look like exactly on your monitor, at least).



Miscellaneous Programming Tools


Gedit is capable of performing some of the same tasks as the "programming intensive" editors, thanks to extensions. Bracket completion, embedded terminals, Python consoles and executing external shell commands are all possible with various Gedit plugins. These probably won't cause avid programmers to replace their tried and true IDEs with Gedit, but it makes Gedit a good (and readily available!) candidate for casual coders and writers who are strongly compelled to format their text.