Praise for the Humble gedit

A rare case of the default option being surprisingly powerful.

I’ve been a fan of lightweight text editors for more than 10 years now. I started out on Emacs, drifted over to Vi(m) for a long stretch and then somehow settled into Textmate for the last couple of years. This week, since I’ve been bouncing from OS to OS, I’m checking in with a number of text editors that I’ve either never used or haven’t visited in a long time. Having been a KDE guy back in the day, gedit falls under the former category.

Fresh out of the box gedit’s not going to win many awards. It’s decent as far as default text editors go — loads quickly, tabbed windows, strong Unicode support, native (but buggy) SFTP support via embedded Nautilus bookmarks in the sidebar, &c. — but where it really shines is when you start to flesh out functionality with plugins.


It was gedit’s complete lack of native regex search/replace that lead me to the gedit plugins page. There you’ll find a ton of great stuff: Browser Previews, HTML Tidy, Class Browsers, Auto-complete, and a pretty good Regex plugin.

All of the plugins are written in Python and writing your own is simple enough. In fact, you don’t even have to write a plugin to control gedit with Python.

The Python Console

gedit’s console is closed by default but if you go to View > Bottom Pane you can bring it up. Under the Python Console1 tab you should see:

You can access the main window through 'window' :
<gedit.Window object at 0x8591f7c (GeditWindow at 0x8144008)>

As you can probably tell, this gives you an enormous amount of control over the editor. You can check this plugin tutorial for a brief overview of the classes you have access to but if you want to be a little overwhelmed try dumping the window class with:

>>> for slot in dir(window):
... 	print slot

There’s a lot of stuff here and much of it self-explanatory and simple to use. Want to create a new tab and populate it with an empty document? Simple:


I’ve been playing around with the Python Console and I’m starting to view it as the colon operator in Vi(m). I guess I could just install the ViGedit plugin but that almost seems too easy.

Textmate without OS X

Textmate for Mac OS X has a pretty hardcore following — I’m counted as a fan — and it would appear there’s a growing contingent of developers looking to recreate the Textmate experience on Linux. I for one applaud these courageous souls that braved the “Why does everyone try to make Linux look like something else” whiners and whipped up some great docs for tricking out gedit:

Let the Text Editor Flame Wars Begin!

Now that I’ve got gedit duly loaded with plugins I’m probably going to be using it for awhile. If you’re not too attached to your .vimrc file you might want to give it a whirl.

I was going to whip up a text editor poll to get a sense of where everyone’s text editor allegiances lie but I figured it would be more democratic and flexible if everyone just posted in the comments. I’ll see if I can’t find my brass knuckles and see you there.

1 If you don’t see a Python Console tab, you’ll need to enable it in the plugin preferences. Go to Edit > Preferences, click on the Plugins tab and check “Python Console.”

Comments on "Praise for the Humble gedit"


I use VIM, gEdit (for Cut&Past work on LINUX) and TextMate (Mac).

The cool thing about TextMate is, that you have an editor with a very slim GUI and on the other hand a bunch of handy stuff that simply make your life easier. You can just focus on your work and don’t have to fight the editor first. TextMate is a life-time-saver!
Honestly … TextMate is one of the main reasons why sometime I use a Mac sometimes.

Thanks for the link collection Bryan!



I use mcedit (midnight commander) for most of my simple editing work. In the GUI I mostly use kate. I have tried VIM and EMacs, but the learning curve seemed a bit too steep for simple text editing.

I haven’t really used gedit, but knowing about the python interface might just get me to look at it again.



I agree with chavoux – Vi and EMACS are just too much hard work to use to edit a text file – I use ‘joe’.


I’m one of those non-denominational text editors.

Vim has a bit of a learning curve, but with a cheat-sheet posted on my monitor I use it for all cli text editing. In the gui I’ve used gedit for a while and like it pretty well. Played with kate some, but don’t use it very much (for no particular reason). On Macs I use TextWrangler and on Windows I use PSPad. I’m all about the free stuff…


“Having been a KDE guy back in the day, gedit falls under the former category.”

Well, actually, gedit would go with GNOME. KDE currently would be Kate or Kwrite . I can’t remember what editor came with KDE back when.


Yeah, that’s what I mean. I used to be strictly KDE so I never had an opportunity use gedit until this week. I don’t recall what the default editor was either in pre-2000 KDE. I’m pretty sure I just set the path to vi though.


The old joke about everyone’s first vi session rings pretty true. But after awhile you start to appreciate all of these ^’s (emacs) and :’s (vi).


When I started with unix about 20 years ago, vi already was a steep learning curve but it was there on every unix machine. The alternative at that time was emacs, which had a more relax learning curve but a steep installation curve as it was (and stil is) not available on every installation…

Then `vi` has some more advantages: If you know vi, specially the : commands, then you know `ed` (which effectively is what you use with the : commands) and you know all ed’s deriviates as `ex` and `sed`.

I see the regexp as available in ed is still unbeaten. It is the major reason why I keep comming back to the commandline to use vi.

btw: I’ve just seen a msWindows Powershell and W2008 presentation. I wonder if edlin is available, notepad still is there…


The only reason I hate emacs – is a scrolling policy of large text. When your eye expects shifting line up, you get centring of this line on screen. It strange but I never meet workaround.



I have had to use Vi a couple of times and each time I am completely lost.

I use Emacs a lot for programming and sometimes even for writing mails and copying them into my mail-program (it tends to die when you send the mail). I do not understand that anyone find the learning curve steep; isn’t this the Platonic ideal of an editor? ;-) You just have to start at a young age ;-)


Anyone having trouble with Vim’s learning curve might want to try installing Cream — it takes some of the sting out of the Vim command structure but doesn’t lose any of its text processing power. We just posted an article about it: Sweeten Your Vim with Cream.


Depending on what I am doing I use vim (full, non vi compatible) or I will use jEdit. On a rare occasion I will pull out nedit and use that. I am kind of weird in that if I am used to editing certain types of files with a certain editor that is what I will feel most comfortable doing. For instance I have spent many years doing console editing of perl code from vim and feel uncomfortable editing/writing perl any other way. One of my pet peeves is all the distros that default to vim minimal, and have a lot of the great features of vim turned off…. that is just plain irritating….


I am so grateful for your blog.Thanks Again. Really Cool.


Greetings I am so glad I found your web site, I really found you by accident, while I was searching on Yahoo for something else, Regardless I am here now and would just like to say thanks a lot for a fantastic post and a all round exciting blog (I also love the theme/design), I don’t have time to browse it all at the minute but I have bookmarked it and also included your RSS feeds, so when I have time I will be back to read much more, Please do keep up the superb job.


Youre so cool! I dont suppose Ive learn anything like this before. So nice to seek out anyone with some authentic thoughts on this subject. realy thank you for beginning this up. this web site is something that is wanted on the internet, somebody with a little bit originality. helpful job for bringing one thing new to the internet!


That’s not even 10 mituens well spent!


Oh yeah, faluuobs stuff there you!


credit history car insurance quotes search query ways car insurance teachers needs insurance car check any particular car insurance quotes feel offer cheap auto insurance lower insurance


involved car insurance business owners moreover coverage car insurance find yourself anything insurance auto quote years insurance make sure car insurance rates insurance businesses


part reflect auto insurance quote vehicles must efforts auto insurance quotes online car must latest updates insurance quotes auto discounts had before online car insurance ask them


check car insurance people hate before being cheap auto insurance insurance company prove yourself cheap car insurance seen sometimes online comparisons auto insurance quotes california state always auto insurance quotes malicious insurance car insurance quotes online clearly did several consumers car insurance quotes online cash value most cases cheap auto insurance need


many sites cheap car insurance quotes fees digital assistants car insurance who like pharmacy auto insurance quotes auto car auto insurance result designed car insurance quotes drivers teen cheap car insurance quotes companies type buy car insurance online shared-market


most cheap car insurance most likely certain discounts auto insurance ligaments sprains each cheap car insurance best rate


become auto insurance cheap second commercials goes wrong auto insurance more people less risk auto insurance quotes no-fault-type payments vehicle insurance car first insurance car insurance quotes total percentage insurance application insurance auto been raising home condo online auto insurance first company legal insurance car insurance discounts


left free auto insurance quotes until after mirror cheap car insurance property facts free car insurance quotes much extra whether auto insurance quotes pay minimum liability online car insurance just having


such terrible car insurance rates sex teenager add affordable auto insurance very threatening risk coverage cheap car insurance rate unfortunately far auto insurance companies time each cheap car insurance collision very detailed auto insurance quote local


america loan auto insurance quote less powerful insurance online auto insurance eventual debt been auto insurance should


full affordable car insurance shopped around smart online auto insurance per week insurance online auto insurance each rate auto insurance drive premium car insurance quotes important coverage required auto insurance quote found most


change insurance insurance auto into any secular court auto insurance quote