Let the Editor Wars Begin!

GUI Editors

In my opinion, GUI-based editors are a “nice to have” tool in the sys admin’s toolbox; I use one every day. First and foremost, admins should know a CLI editor in case they need to log in to a system on which X is not running or it is not installed. To be honest, though, the frequency of these situations is much lower than it used to be, so knowing a GUI editor for developing code, processing and reading logs, or writing articles or manuals is a very useful tool.

In this section, I want to mention a few GUI editors that seem to be popular. I chose open source editors that I have heard about and have, for the most part, experimented with in some fashion. It’s definitely not an exhaustive list, and I don’t contrast features, but I do try to provide some personal insight into them.

At this time, I am not considering IDEs, which can also build and execute an application from within the editing environment. Text editors strictly allow you to edit text in documents. Although editors and IDEs often overlap, the focus here is on editors.

Atom

Atom was designed by GitHub Inc. The cross-platform editor is written in CoffeeScript and Less, and it’s embedded Git controls lend a huge appeal to developers. Atom has a large range of default plugins written in Node.js for many languages.

Atom (Figure 5) has become a very popular editor because it's very hackable and it has built-in GitHub controls and Github is where everyone stores their code now. It is also cross-platform since it uses web tools such CoffeeScript, Less, and Node.js.

Figure 5: Atom on Windows 10.

If you write a fair amount of code and are looking for a good modern editor, take a look at Atom.

Editra

Editra is a multiplatform editor written in Python using wxWindows (renamed wxWidgets). The first version was released in 2007, and it is still under development. The current version has not yet reached 1.0, yet it has a great deal of promise and being written in Python greatly improves the cross-platform capability.

Even though Editra is in development, it has a large number of features you would expect from a more mature editor, including:

  • Syntax highlighting for more than 60 languages
  • Auto-complete (Python, C, XML)
  • Auto-indent
  • Column edit mode (sort of rare in editors, but very useful)
  • Customizable interface
  • Editing of remote files using the FTPEdit plugin
  • Integrated Python shell (PyShell plugin)
  • vi keybinding support
  • Zoom
  • Code folding

Figure 6 shows Editra running on a Windows 10 laptop (testing the multiplatform capability).

Figure 6: Editra 0.7.20 on Windows 10.
Geany

Geany is my exceptions to the “no IDE” rule, because it can also be used as a simple editor. It is written with Gtk+ using the Scintilla editor component that is also used in the Windows version of Notepad++.

Figure 7: Geany 1.27 on Windows 10.

At the bottom of Figure 7, you can see a feedback area used during compile time. You can minimize this section to give yourself a larger editor window. Geany has many of the features of a classic text editor:

  • Syntax highlighting for 64 languages
  • Code folding
  • Auto-completion
  • Project management
  • Multiplatform

Geany is easy to learn, so you can be productive immediately, and if you need an IDE, you can keep using the same tool.

gedit

A couple of years ago I had a personal editor crisis at about the same time as Joe Landman. We had both used NEdit for many years. However, it was getting a little old, in some cases crashing on certain distributions, so I started looking at editor options, many of which you are reading about in this article. The editor on which I decided for most of my work is gedit.

Gedit is the default text editor for Gnome and is considered part of the Gnome Core Applications. This multiplatform editor is available for Linux, Microsoft Windows, and Mac OS X. It has the classic editor features, such as line numbering (absolute necessary in my opinion), bracket matching, text wrapping, syntax highlighting, automatic indentation, and automatic file backup. It performs syntax highlighting with the help of extension files.

I started using gedit on Windows with version 2.30 (Figure 8) and with about the same version on CentOS 6.x.

Figure 8: Gedit 2.30 on Windows 10.

The current version 3.20 (Figure 9) of gedit has a new, cleaner interface that works with newer desktop interfaces such as Unity.

Figure 9: gedit 3.20 on Windows 10.
jEdit

One of my pet peeves about GUI text editors is that they are rarely able to handle column manipulation – that is, the ability to cut/copy/paste text in a column fashion. For many years I used NEdit, which has this ability, and I used it frequently. However, NEdit had not been updated in a while, and I had problems with it crashing, so I started looking for new editor. The first feature I looked for was the ability to perform column manipulation. jEdit was the first, but not the only, editor I found that could do this.

jEdit is written in Java, so it runs on any OS with Java support. It has a large number of features desired in a text editor, including:

  • Syntax highlighting for more than 200 languages
  • Split-screen mode
  • Code folding
  • Markers
  • Customizable
  • Macros
  • >150 plugins
  • Column manipulation (cut/copy/paste)

Plugins allow jEdit to behave as a lightweight IDE. Figure 10 illustrates the interface.

Figure 10: jEdit 1.7.0 on Windows 10.
JuffEd

Perhaps a lesser known is JuffEd (Figure 11), which is nevertheless a powerful cross-platform text editor. As with two other editors in this review, JuffEd uses Scintilla for the editor component.

Figure 11: JuffEd 0.8.1 on Windows 10.

JuffEd has a very large feature set that comparable to the most advanced editors:

  • Plugins for syntax highlighting for 20+ languages
  • Code folding
  • Braces matching
  • Cross-platform
  • Line numbers
  • Markers
  • Multilingual support

Take a look at JuffEd – it is pretty nifty.

Kate

Kate (KDE Advanced Text Editor) is part of the KDE Software Compilation and is considered the KDE text editor. It has been around a fairly long time starting with KDE 2.2 in 2001.

Kate has many of the features of a classic editor, including syntax highlighting (based on file extensions), code folding, layouts that can be customized, regular expression support, and more. If you haven't used code folding before, you should try it out; it can be a useful feature in long code files. You can take a section of code and "fold" it so that it is hidden from view. When you "unfold," the section of code becomes visible.

Kate (Figure 1) also allows you to split the screen so you can see two parts of the file at the same time (always a useful feature). On the left-hand side, Kate maintains a list of files that are being edited, so you can switch back and forth.

Figure 12: Kate 3.3.4 on CentOS 6.8 with KDE.
Leafpad

No one says that a GUI editor has to have lots of features. It can be very lightweight and simple, which is exactly the focus of Leafpad, the default editor for the LXDE environment and Xubuntu 11.10 and 12.04. If you have used Raspbian on a Raspberry Pi, you probably used Leafpad.

Leafpad (Figure 13), currently only runs on Linux. It is not feature rich because its focus is on ease of use, small size, and fast start-up. Its main features are:

  • Codeset option
  • Unlimited undo/redo
  • Auto-/multiline indentation
  • Drag and drop
  • Printing
  • Line numbering

I started using Leafpad on Raspbian with a Raspberry Pi 2, and I found it to be very useful and quite fast. I've been using it on my Linux laptop as well. Below is a screen shot of the editor on my Linux desktop.

Figure 13: Leafpad 0.8.18.1 on CentOS 6.8.
NEdit

The first GUI editor I used was NEdit (Nirvana Editor) on SGI workstations running IRIX. It was originally developed at Fermilab, but the version today on Linux was developed as an independent open source project with the GNU GPL license. NEdit was built using the Motif toolkit, which was very popular when it was released.

I used NEdit on Linux for many years to write a great deal of both code and text. According to the Wikipedia article, development of NEdit stopped in 2010. With few updates since, the last release was version 5.6 in December 2014, which was 10 years after the release of the previous version.

NEdit (Figure 14) comes with many features, including bracket matching, syntax highlighting, line numbering (basically mandatory for a text editor), a very good search and replace function with which you can use regular expressions, macros, block selection of text (i.e. specified rows and columns), and my personal favorite, column cut/copy/paste capability. If you look around the web a bit, you will find lots of people who recommend it highly, but be aware that NEdit still relies on Motif, which is slowly giving way to more modern toolkits.

Below is an image captured from my CentOS 6.8 desktop.

Figure 14: NEdit on CentOS 6.8.
Notepad++ and Notepadqq

One of the most popular editors in the Windows world is Notepad++. As you can tell from the name, it is intended to be a much better version of Notepad, which has been very popular for editing code on Windows. Figure 14 is a screenshot from my Windows 10 system.
Notepad++ has split-screen editing, a tabbed document interface, a spell checker, syntax highlighting, code folding, brace matching, macros, and several other features common in editors. It supports a large number of languages for syntax highlighting, including Fortran (the true language of HPC kings), Matlab, Python, and Perl. People have been asking for Notepad++ on Linux for many years. The code is open source and uses the Scintilla editing component. However, it uses some pure Win32 and Standard Template Library (STL) functions, so it doesn't port easily to other platforms, although a few attempts have been made with without any real success.

A Linux editor that is similar to Notepad++ is Notepadqq (Figure 15), which is a pretty close Notepad++ work-alike for Linux. It includes syntax highlighting, code folding, support for many languages (>100), and extensions written in Node.js (JavaScript).

Figure 15: Notepadqq on Windows 10.
SciTE

The SciTE editor is also based on the Scintilla editor component; therefore, it is somewhat similar to Geany and Notepad++. Designed to be simple and lightweight, SciTE (Figure 16) has a number of good features:

  • Syntax highlighting (36 languages)
  • Editing multiple files at the same time
  • Selection of rectangular sections of text
  • Code folding
  • Scripting in Lua
  • File export as plain text or PDF
Figure 16: SciTE 3.3.5 on CentOS 6.8.

SciTE has two windows. The top (or left) is for text editing and the bottom (or the right) is called the output window. You can minimize this window to maximize editor space.

Parting Words of Wisdom

The examples in this article are only a few of the possible choices you have for editing. However, I strongly recommend that you learn the basics of at least one CLI editor and at least one GUI editor, which I think are better for writing code and documents.

In the end, which editor or editors you use is a personal choice. It's good to try out new editors from time to time, but don't let anyone bully you into switching editors.

This blog represents my own view points and not those of my employer, Amazon Web Services.