Monday, July 23, 2012

How to add text completion functionality to Gedit text editor (Ubuntu)

Today many open source text editors are available, for Ubuntu and Debian operating systems (OS). Both OS have 'gedit' as their default text editor. In its default settings gedit will not provide advanced auto text completion, but you can modify the settings to avail this functionality.

Many times my fellow developers asked me why I am using gedit for coding, while other more advanced editors are available. I didn't had a reason to support my favor to gedit, but personal preference. I thought about making gedit a more useful editor like geany, sublime etc.(both are open source editors) and i searched in Google for improving the coding standards and editor efficiency, finally I found the Gedit plugin.

You can download this plugin from the below links.

Features

  • Auto-close brackets and quotes
  • Auto-complete XML tags
  • Detects lists and automatically creates new list items
  • Auto-indent after function or list

Installation

Gedit 2 (up till Ubuntu 11.04)

  1. Unpack the archive
  2. Put  intelligent_text_completion.gedit-plugin and intelligent_text_completion.py inside .gnome2/gedit/plugins/ in your home directory.if folder extension is starting with '.' it means that folder is a hidden folder in Ubuntu lots of system supported folders are hidden, Open your home directory and go to view->show hidden files or ctrl+h (create it if it doesn't exist yet, by default the 'plugins' folder will not be there.) 
  3. How to get .gnome2 folder in your Ubuntu machine?,
  4. Restart Gedit.
  5. Go to Edit->Preferences->Plugins and check the box for Intelligent Text Completion
Gedit 3 (Ubuntu 11.10 or higher)
  1. Unpack the archive
  2. Put intelligent_text_completion.plugin and intelligent_text_completion.py inside .local/share/gedit/plugins in your home directory. (create it if it doesn't exist yet)
  3. Restart Gedit.
  4. Go to Edit->Preferences->Plugins and check the box for Intelligent Text Completion
 


No comments:

Post a Comment