Nov 062011
 

by
Frank Harris-Smith

gEdit is a serious text editor in the tradition of many editors that the programmer or code jockey will appreciate – syntax highlighting in many source codes, script formats, markup formats, and even some Scientific formats.

I write a lot of HTML code and I find the multiple undo/redo, find, search & replace, and the built-in code-aware spelling checker essential on a daily basis.



But that’s me. I’m writing about what I use on a daily basis and gEdit is always open on my PC of the moment. I do HTML coding for my personal website, keep lists of “To-Do” items, use it as a scratch pad to paste whatever nuggets of wisdom I find on the Internet and generally use it for quickly jotting down whatever I need to note.

In this day of sophisticated Word Processors and Publishers,
why would a text editor be still be needed?

Things don’t always go exactly as you planned. LibreOffice, which I’m writing this on, has a “save as HTML” feature,. Which I did (save as HTML) to demonstrate what gEdit is useful for.

This is what it looked like. Word Processors aren’t perfect

html unedited

Editing the HTML code in gEdit

edited

Notice the syntax highlighting which for any kind of coding is essential?

Here’s what my quick editing looks like, 11 keystrokes and two clicks

fixed

There are many plugins for gEdit that add new functions. The Tag List is one I use frequently to look up character and tag codes.The spelling checker is especially valuable. I’m hardly perfect in either my spelling or typing.

Here is the Plugins Tab in the gEdit Preferences

plugins

There are many programming specific plugins including a bottom pane embedded bash terminal. All Linux programmers can use a convenient terminal that you can cut & paste to and from.

Pressing “F9” will open this side pane with your Tag List

tag list

And here’s the bash terminal plugin:

bash terminal

The Orange circle shows the terminal window size adjuster

The editor has 5 different color schemes, the one in the example above is “Oblivion”.


Two more useful programmer plugins are the code comment and the session saver.

Commenting code is essential if you ever expect someone else to understand your code. Or even yourself if some time has passed and you can’t quite figure out what you did. What was I thinking way back in 1998?

comment

To add a comment to your code type the text, highlight it, and then type [CTRL] m or [CTRL][Shift] m to remove the commenting.

The session saver is really nice when doing a project involving multiple files being edited. You can save your session when you need to stop for a time and when you restore the session, all your opened files all get opened in the exact same tab order as you saved them.

I recently upgraded my laptop to Ubuntu 11.10 because I was running two different Word Processors, LibreOffice on my desktop system and OpenOffice on my laptop. They are almost identical but not completely. LO wanted to do bullets one way but OO had a completely different idea.

However, before I upgraded I ran a LiveCD of Ubuntu 11.10 to see if it was what I wanted. One of the first things I checked – did the Distro include gEdit? A gEdit-less Distro would have been a deal breaker for me.

Gedit is officially known as the “Gnome text editor” but there are Windows and Macintosh ports of gEdit. You can even find it as part of non-Gnome Distros like Ubuntu 11.10 Unity or you can find it in many Distro Software repository.

In 2006 when I was running my first laptop on Xubuntu (XFCE + Ubuntu) I installed gEdit because I need a serious text editor, not “mousepad”. gEdit worked in Xunbuntu and I’ve been using it since I first started playing with Linux 6 years ago.

You can get more information at gEdit Gnome Project Page

Popular Posts:

Flattr this!

  14 Responses to “gEdit, an easy to use text editor with many advanced features”

  1. I love gedit for fast editing, it pops up much faster than a full-featured code editor while still having the essentials like syntax highlighting.

  2. gEdit is absolutely excellent! I use it for coding in C every day. Session saving is very useful too.

  3. Great article. Love gedit and use it daily for editing everything! Better than the text based vi or vim to be sure.

    Keith

  4. “You can even find it as part of non-Gnome Distros like Ubuntu 11.10 Unity or you can find it in many Distro Software repository.”
    Ubuntu 11.10 use gnome.

  5. I use gedit often but I am not impressed. It is about details. Like selecting worlds, when there is an underscore in the variable name, only part of the variable is selected by double click. When I select a text, I don’t see how many characters are selected, I have to count them manually (this is useful feature for writing scripts, for substr(), etc). gEdit doesn’t show me ASCII code of character under cursor. I cannot use block selections (rectangular area of text). I cannot… Well, whenever I can do it, I edit text with freeware texteditor PSpad under Windows and I use gEdit only for small text modifications at Linux. Or I use VIM at Linux. gEdit is just better NOTEPAD (system editor from Windows), it is not so great editor that you have to write an article about it…

  6. After reading this article, I gave gedit a look. For my purposes (I’m a developer of environmental modeling software), it would drive me up the wall: I need multiple side-by-side editing windows where I*’m comparing code X with code Y, and the way gedit forces you into tabbed editing would make my life impossible.

    This force-me-into-one-window arrogance on the part of the gedit developers (and the Gnome developers in general) is absurd!

    • If you have multiple tabs open in gedit, try dragging one of the tabs onto the desktop. gedit will open up a second instance in a new window containing just that tab. That’s what I use when I need two files open side-by-side.

      But for comparing files I’ve been using meld http://meld.sourceforge.net/ Useful, but not quite as powerful as WinMerge http://winmerge.org/ There’s something I’d love to see ported to Linux!

      –Bob.

      • Thanks for the tip Bob.

        • You can also select Documents > New Tab Group (or just press Ctrl – Alt – N), and it will open up a sort of separate window within the same instance of Gedit.

          You might have already known about this, but I encourage you to install the gedit-plugins package in your linux distro of choice. There’s quite a few additional plugins that can make it easier to code using gedit.

          I’m working on documentation for the 3.4 release, and will have better documentation for gedit snippets, too. They are a neat feature of gedit. A quick google search will give you more information about them, and how you can use them.

  7. Keep up the good piece of work, I read few posts on this internet site and I
    think that your web blog is very interesting and contains circles of good info.

  8. They appear to have simplified/destroyed it to the point where it’s no longer usable

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*