gedit: Add Python / C++ Autocomplete Support

How do I add Autocomplete support to gedit text editor under Linux Gnome desktop operating systems?

gedit is a general purpose UTF-8 compatible text editor for the GNOME desktop systems. gedit is well known for its simplicity and ease of use. You can easily edit various scripting and programming languages source code with gedit.

It is the default text editor for GNOME. gedit comes with a flexible plugin system allowing to dynamically add new features. A number of plugins are included in gedit itself, with more plugins in the gedit-plugins package and online.

Install plugins

Under Debian / Ubuntu Linux you can type the following command to install commonly used plugins:
$ sudo apt-get update
$ sudo apt-get install gedit-plugins

To configure plugin open gedit and visit Edit > Preferences > Plugins Tab

Fig.01: Gedit - Enabling / Disabling a Plugin

How Do I Enable a Plugin?

To enable a gedit plugin, perform the following steps:

  • Choose Edit ▸ Preferences.
  • Select the Plugins tab.
  • Select the check box next to the name of the plugin that you want to enable.
  • Click Close to close the Preferences dialog.

Step For Disabling a Plugin

A plugin remains enabled when you quit gedit. To disable a gedit plugin, perform the following steps:

  1. Choose Edit ▸ Preferences.
  2. Select the Plugins tab.
  3. Deselect the check box next to the name of the plugin that you want to disable.
  4. Click Close to close the Preferences dialog.

Add Python / C++ Autocomplete Plugin

Grab the latest version of Autocomplete plugin here. Unzip / untar the ball:
$ unzip
Sample Outputs:

   creating: nagaozen-gedit-plugin-autocomplete-9e7664759c9486f6cd402f89bedd7a3488328580/
  inflating: nagaozen-gedit-plugin-autocomplete-9e7664759c9486f6cd402f89bedd7a3488328580/  
  inflating: nagaozen-gedit-plugin-autocomplete-9e7664759c9486f6cd402f89bedd7a3488328580/autocomplete.gedit-plugin  
   creating: nagaozen-gedit-plugin-autocomplete-9e7664759c9486f6cd402f89bedd7a3488328580/autocomplete/
  inflating: nagaozen-gedit-plugin-autocomplete-9e7664759c9486f6cd402f89bedd7a3488328580/autocomplete/

List files:
$ cd nagaozen-gedit-plugin-autocomplete-9e7664759c9486f6cd402f89bedd7a3488328580
$ ls -l

Sample Outputs:

total 12
drwxr-xr-x 2 vivek vivek 4096 2009-05-16 05:01 autocomplete
-rw-r--r-- 1 vivek vivek  594 2009-05-16 05:01 autocomplete.gedit-plugin
-rw-r--r-- 1 vivek vivek 2107 2009-05-16 05:01

Install Autocomplete Plugin

Type the following commands:
$ mkdir ~/.gnome2/gedit/plugins/
$ cp -avr * ~/.gnome2/gedit/plugins/

To enable a gedit autocomplete plugin, perform the following steps:

  • Choose Edit ▸ Preferences.
  • Select the Plugins tab.
  • Select the check box next to the name of the Autocomplete plugin.
  • Click Close to close the Preferences dialog.

Now start writing code and you should see the popup autocomplete. Press [Enter] key to accept the completion.

Fig.02: Autocomplete in Action


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 14 comments so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
14 comments… add one
  • Jaysunn Sep 12, 2009 @ 12:50

    Great tip,

    I was unaware that gedit was capable of this. I will be sure to install and learn from it.

    Thanks Alot,


    • Kalid Oct 11, 2020 @ 13:40

      Please help me

  • shashidhar Sep 12, 2009 @ 14:53

    Good one,

    I too don’t know that gedit supports this kind of feature through plugins.

  • spaceyjase Sep 12, 2009 @ 18:32

    Great article; wasn’t aware gedit could do this so a big thank you!

    “Select the check box next to the name of the Autocomplete plugin.”

    It was called ‘Python Code Completion’ in the plugin list :)

  • arunkumar Sep 13, 2009 @ 10:37

    Great to know about this feature in gedit

  • kalanjali Oct 3, 2009 @ 15:35

    it’s not working
    i tried it on eswecha/debian version

  • S. Nilesh ( Oct 9, 2009 @ 17:21

    great feature. i wasn’t aware of this plugin.

  • nagaozen Dec 22, 2009 @ 3:08

    XD thanks for highlighting my autocomplete plugin. Just some notes:

    In “Grab the latest version of Autocomplete plugin here. Unzip / untar the ball:” – Autocomplete link goes to pycomplete (which is not the one picture is showing)

  • BuZain Mar 21, 2010 @ 19:51

    Thanks for the autocomplete installation steps. I’ve just started coding python after a long hiatus and this feature is a great support. BTW, the latest version of the plugin has an install script that does all the magic.

  • patrick Nov 4, 2010 @ 14:54

    Thank you for this plugin – it is great!

  • daniel Nov 6, 2010 @ 11:00

    Well, this autocompletion is useless if all it proposes are names of objects already used in the source code. I’m still struggling with finding an autocompletion plugin that would be aware of all installed python modules and be able to propose those. Or am I missing something?

  • Vinicius Jul 29, 2011 @ 17:16

    I can’t use the autocompletion plugin because it doesn’t have a python.json into lib folder, only asp.json… what do I do to enable python autocompletion with this plugin?

  • Nicolas Sep 27, 2011 @ 18:23

    Hi everyone, I have a problem with my Mac os x Snow Leopard: I follow every step, but the Plugin isn’t at the panel in Preferences…can somebody help me?



  • mathieu Nov 3, 2016 @ 10:54

    new link: ( gedit-plugin-codecompletion )


Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @