We continue our Linuxables series on the Linux text editor. As you might have noticed, this is one of those topics that breed much contempt. If you talk about vi, you must give equal time to emacs. If you talk about Kate, you best talk about Gedit. And that is precisely where we are - Gedit (although we have yet to talk about Kate, that comes next week).
So far what we've discussed in this series is text-based text editors. These text-based editors are hold-overs from the days of UNIX when many machines were GUI-less but still had to have the ability to edit configuration files. Well, fewer and fewer machines are GUI-less now, but they still need to have configuration files edited. Although the text-based editors are still very popular (I use Nano myself), many users are hesitant to have to learn the various keyboard combinations in order to simple tasks such as saving a file, searching a file, and copying or pasting text. So, what do they do? Open up their configuration files in OpenOffice? That is certainly not advisable. For those users who want to edit text using a GUI tool and the GNOME desktop, there is a great solution in Gedit.
Gedit is the "official" text editor for the GNOME desktop. It offers plenty of features that will appeal to just about any level of user:
- Full support for internationalized text.
- Configurable syntax highlighting for many languages.
- Remote edit support.
- File reverting.
- Print and print preview support
- Copy/paste/cut support.
- Search and replace.
- Go to specific line.
- Auto indentation.
- Text wrapping.
- Line numbers.
- Right margin.
- Current line highlighting.
- Bracket matching.
- Configurable fonts and colors.
- Online user manual.
- Tab support.
By default Gedit will be installed on a GNOME desktop. In order to start Gedit click Start > Accessories > Gedit Text Editor. When Gedit opens you will see a very simple window open that looks like pretty much any other application: It has a working pane, tool bars, menu bars, etc. Figure 1 shows Gedit in action complete with a simple bash file to illustrate the syntax highlighting. You can actually change the syntax highlighting mode by clicking View > Highlight Mode and then clicking one of the submenus to select the type of highlighting you want.
Unlike the text-based editors, Gedit will work and perform exactly as you would expect it to. Copy/paste keyboard shortcuts work exactly as you would expect, printing, spell checking, everything will work just as you are accustomed to with other editing applications. The only difference you might find is that previously opened/saved documents will not be found in File > Recent Documents, but under the Documents menu. This menu also allows you to switch back and forth between open tabs.
What? Did you say "tabs"? Yes, I did. One sweet feature of Gedit is that it supports tabs so you can have as many documents open as you need and keep them all neatly packed away in one easy to reach window.
Windows? Say it isn't so!
If you read between the lines of the above heading then you understand there is a port of Gedit for the Windows operating system. There is even a port for OS X for all you Apple fans. Linux does, in fact, play well with others.