Using Gedit As a Python IDE





Introduction: Using Gedit As a Python IDE

About: I decided a long time ago to change this text. Now, it still says this.

If you've ever used Ubuntu, or Gnome for that matter, you're probably familiar with gedit. Gedit is a wonderful basic text editor, especially if you've come from Windows and Notepad!

It has tabs, syntax highlighting, and when you use some plugins, you can get all the features of other Python IDE's. Best of all, since it has the syntax highlighting for most languages, and its your basic text editor, you can use it to edit all your files, instead of having x open for your C programs, y open for your configuration file editing, and z open to do your javascripting. When I use python to do web work, this helps, since I have python, JS, HTML, and CSS all open at once.

Step 1: Changing Preferences

Open up gedit,

The rest of the instructable is based in here.

First, you'll want to set up settings in the "View" tab.
I highly reccomend Text Wrapping, Line Numbers (for Debugging), and Bracket Matching. The Current Line highlighting annoys some people, and I hate that margin, but go ahead and add it if you like it.

In the Editor tab, you'll want to check off the first 2 boxes and set the Tab width to 4 if you're using python, as that's the standard. (Python uses tabulation instead of { and } brackets)
If you're not going to use it for Python, set the value to whatever you like.

For File Saving, you can do whatever you like.

Step 2: Enabling Plugins

Now, to make it more like an IDE, here are some of the plugins that work really well. Luckily, I could fit them in 1 scroll-down! :P

External Tools -- (See second pic. for configuration) Great for launching the dev. server, I don't use it, but you might.

File Browser Pane -- Again, I don't like it, but some people like to be able to see all the open docs at once.

Indent Lines -- Self-explanitory

Modelines -- Most python scripts will have a modeline outlining how tabbing works, enabling this will allow gedit to adjust to the tabbing.

Python Console -- What IDE would be complete without a Python Console!?

Snippets -- Good for inserting things like DB connection info, or a set of imports

Voila! Gedit is now a fully-functional IDE! Although I've used gedit as an example, Kate works just as well.

Personally, I perfer drop-down terminals, such as Tilda or Yakuake, rather than using a terminal embedded in an IDE. They stay out of the way, easy to bring down, and you can use them as your main terminal.



      • Casting Contest

        Casting Contest
      • Spotless Contest

        Spotless Contest
      • Flowers Challenge

        Flowers Challenge

      We have a be nice policy.
      Please be positive and constructive.




      I like IPython for interactive work a lot better than the default. Is there a way to include this as the console instead?

      the nice thing about geany is that it's pretty simple -- it's NOT project based like many ide's -- anyways, gedit is probly simpler

      there's a cool lightweight ide called "geany" that i have just started using for java, but it supports python, c ,c++, blah blah and blah as well. it's in the repo's!

      1 reply

      Its not that there aren't any avaible, its just I hate them all. They're too cluttered. This, its JUST the text editor, and I can use Yakuake/Tilda as a pull-down terminal, which also stays out of the way.