Computers : Gedit

Updated: 5th November 2008

Gedit Text Editor

This page contains information about configurations, plugins and themes for the Gedit text editor for Gnome.

Click the links below to jump to the various sections.


Configuration

When you first run Gedit it may seem like a pretty basic text editor but it can be customised to suit most tastes through the built in options, preferences, plugins and themes.

As an example here's a screenshot (click the thumbnail below) of how I've customised Gedit.

Gedit Screenshot

A few of the things I've altered include:

Remove Toolbar

Go to 'View' then untick 'Toolbar'.

Remove the top tabs

Activate the Show/Hide Tabbar plugin (Edit > Preferences > Plugins) and then go to 'View' and untick 'Tabbar'.

Show Side Pane

Go to 'View' then tick 'Side Pane' (or F9).

Show Bottom Pane

Go to 'View' then tick 'Bottom Pane' (or Shift+F9).

Embed Terminal

Activat the Embed Terminal plugin (Edit > Preferences > Plugins) which will then show in the Bottom Pane.

Kate Theme

Edit > Preferences > Font & Colours > Kate.

Display Line Numbers

Edit > Preferences > View, and tick 'Display line numbers'.

This list is far from extensive and doesn't include all the modifications that can be made but, along with the information below, should be more than enough to get you started.


Plugins

First thing to do is make sure you have the 'gedit-plugins' installed which will give you the following plugins:

  • Smart Spaces: Forget you're not using tabulations.
  • Embedded Terminal: Embed a terminal in the bottom pane.
  • Show/Hide Tabbar: Add a menu entry to show/hide the tabbar.
  • Join/Split Lines: Join several lines or split long ones.
  • Color Picker: Pick a color from a dialog and insert its hexadecimal representation.
  • Draw Spaces: Draw Spaces and Tabs.
  • Session Saver: Save and restore your working sessions.
  • Code comment: Comment out or uncomment a selected block of code.
  • Bracket Completion: Automatically adds closing brackets.
  • Character Map: Insert special characters just by clicking on them.

Install gedit-plugins

Or via the terminal:

sudo apt-get install gedit-plugins

Additional Plugins & Information

Additional plugins can be added to the hidden files in your home directory ~/.gnome2/gedit/plugins. If the plugins directory/folder doesn't exist then create it.

Then to activate the plugins run Gedit and go into Edit > Preferences > Plugins, and tick to active them (Restarting Gedit may be required for them to function).

Some additional plugins that you may find useful.

Bookmarks Plugin - Adds a bookmarking system with support for folders.

Browser Preview plugin - Allows you to preview the current working page in a browser of your choice (View > View in > Browser of choice ).

Plugins Information - Contains information on most of the avialable plugins.

Word Completion - Complete words with the tab key. You will need to save the two files (completion.gedit-plugin and completion.py) to your plugins folder (and then active them).

Create your own plugins with the Python How To and C How To.

Themes

Themes change how your code is coloured and changed by going into:
Edit > Preferences > Font & Colours.

By default in Gedit 2.24.0 you can choose between the 4 options, Classic, Kate, Oblivion and Tango.

Additional Themes

Some additional Gedit colour themes can be found here.

DIY

In future releases there may be a theme editor but until then if you wish to make your own the easiest method would be to go into:
/usr/share/gtksourceview-2.0/styles/
Copy (then rename) one of the existing themes and modify it to your own specification. More information on this can be found here.