A programmer looks at the current versions of five well-known text editors and offers his take on how well they perform.
By Himanshu Arora
July 31, 2013 06:00 AM ET
Computerworld -
Today's Linux text editors bridge the gap between the needs of high-end
programmers and those of day-to-day users. These applications offer a
range of functionality, from clean and user-friendly interfaces
(preferred for normal text editing) to power-packed features (required
for programming).
Most Linux users I've talked to tell me they want a text editor that
can be used for normal text editing (and even some word processing) as
well as for hard-core programming and coding. And, of course, they're
looking for a low learning curve. While most review round-ups try to answer the question "Which product is the best?" the real question in this case is: "Which one is best for you?" It all depends on what you require -- whether you are more comfortable with easier, graphic-based interfaces or just want a solid, down-and-dirty text editor. The following should provide some guidance as to where to look.
Gedit
Gedit -- the official text editor for Linux flavors that support the Gnome desktop environment -- is a simple yet useful graphical text editor that is often the first choice of users who are new to *nix systems. This editor has been part of the Gnome project since the project came into existence in 1997.
What's new
Gedit includes a variety of strong features including UTF-8 support, syntax highlighting, the ability to edit files kept at remote machines, text wrapping and tab support. The latest version of Gedit (3.8.1) introduces a Zeitgeist plugin to use the libzeitgeist2 library, some improvements in the documentation and miscellaneous bug fixes.What's good about it
Besides being a good text editor for newbies, Gedit provides many features that make it programmer and developer friendly. These include auto indentation, line numbers, bracket matching, backup files and auto-save files. Another nice feature is its ability to recognize and open most file formats with syntax highlighting.I personally like the ability of Gedit to open files in tabs (as in a browser), which makes switching between files really easy.
There are some other nice features. For example, if you are programmer and your manager is very strict about code indentation, you can disable tabulation and opt for auto indentation by checking the corresponding options in the Edit --> Preferences --> Editor menu.
Gedit includes a plugin facility through which various plugins -- offered with Gedit or from third parties -- can be added. This flexibility results in enormous power.
What needs to be fixed
As a programmer, I feel that Gedit could do more by adding features such as code folding into its armory. When handling huge files, it is really useful if you can fold/collapse irrelevant sections and work only on those sections that require editing.Another minor problem: When using #if 0 and #endif to comment on C/C++ code, the comments are the same color as normal text comments. So if you have lots of text comments in your code and somewhere in-between you have a commented block of code, then it sometimes becomes difficult to identify the commented code.
Bottom line
Gedit is very simple to learn and use -- you only have to learn various configuration options if you need advanced features.GNU Emacs
What's new
GNU Emacs is one of the oldest text editors around, but it's still being developed and maintained actively. The latest stable release -- 24.3 -- was released on March 11, 2013.This release includes several major improvements, including an update for the Common Lisp emulation library, and a new major mode for Python, among others.
What's good about it
Written in C and Emacs Lisp (a dialect of the Lisp programming language), GNU Emacs is a user-friendly, customizable, and extensible text editor. It includes almost all of the features that are required in a good text editor.For example, it offers context-sensitive editing modes, good tutorials and built-in documentation for new users, complete Unicode support for most human languages, and extensions to add new functionality. In addition, GNU Emacs is capable of printing and formatting documents just like a word processor, which isn't all that usual in a programming text editor.
What needs to be fixed
Beside a steep learning curve, the major downside of GNU Emacs is its relatively slow performance. When compared with other text editors, GNU Emacs runs a bit slower because the Lisp code takes time to load and interpret, which can cause performance issues when dealing with very large files. But for daily usage, with average-sized files, this shouldn't be an issue.Bottom line
Despite being more than three decades old, GNU Emacs still holds its ground with a large and loyal following. The fact that it is still actively maintained, is user-friendly and comes with built-in documentation and tutorials makes it a worth using for day-to-day text editing work.GNU Nano
What's new
Nano contains all the basic features of a standard text editor. It was actively maintained until 2010, but since then activity seems to have slowed down a bit. The latest version of Nano is 2.2.6, which, according to change logs, was released on November 22, 2010.This release adds a section to the FAQ about how to use nanorc (Nano's RCFile) on Win32 systems and returns the check for restricted mode to the spell-checker.
What's good about it
Nano is the text editor that pops up by default when you run the visudo command on Ubuntu Linux (to edit sudoers information). It contains all the functionalities and features of Pico but adds some extra features, such as regular expression-based search and replace, smooth scrolling and colored text.What needs to be fixed
The only problem I have with Nano is that it was created to emulate Pico -- which was not a feature-rich editor. Though Nano adds some extra features, it still stands behind Vi/Vim editors, which are more powerful command-line text editors that provide a variety of features.Bottom line
GNU Nano is a small and lightweight text editor that may not work as a full-blown IDE (integrated development environment) for programmers but is still capable of handling standard text editor tasks. Despite being command-line based, it is simple and easy to use.KATE
What's new
With the release of KDE 4.10, many new features have been added to KATE. Open bugs were reduced from 850 to 60, while new features include a new project management plugin, new quick open functionality (which allows a hot key -- Ctrl+Alt+O in KATE -- to open one or more files quickly) and an optional "minimap" that can be used as a scrollbar.What's good about it
KATE gives the knockout punch to heavy and complicated IDEs by providing features that help create projects. For example, it offers a project view that makes it easier to search, edit and compile code files. The screen is divided in two main parts: The left part lists files and folders in a tree view, while the right part is for editing the currently selected file.Besides standard features, KATE comes with support for GDB and breakpoints (for debugging). This is very helpful for programmers who need to do a lot of debugging.
With all these features (and more), KATE feels more like a full-blown IDE than just a programming text editor.
What needs to be fixed
One of the biggest downsides of KATE for me is that it comes as a part of the KDE package, which means that it will not work well with other popular desktop environments such as Gnome. And in general, I feel that programming using GUI-based editors is a bit slow when compared to command-line based editors (mainly due to mouse usage).Bottom line
Go for KATE if you develop and/or program on a KDE-supported system but do not like purely command-line programming editors. I think it's the closest a GUI text editor can get to an IDE.Vim
What's new
Vim was initially designed to be used as a terminal-based text editor; however, there are many GUI front ends available for it today. The latest release (version 7) came out in 2006 and introduced some prominent features like spell-check, auto-complete, undo branches and a tabbed interface. Version 7.3 (released in 2010) is the latest minor release that adds features such as Python 3 support and a persistent undo feature.What's good about it
Vim is a command-line editor. This means that you do not have to take your hands off the keyboard while editing any kind of file with Vim. Once you are used to it, this makes editing very fast.Syntax highlighting -- highlighting different categories of text in various colors and/or fonts -- is another powerful feature of Vim. Over 200 languages are supported; you can also create your own syntax. Vim also highlights programming errors -- I have written numerous C programs using Vim, and the way it highlights mistakes such as a missing or extra bracket is very helpful.
If you are an existing Vi user, Vim will definitely strike the right chord with the set of improvements it brings over Vi. For example, Vim comes with an unlimited undo feature (as compared to the last command undo supported by Vi). Vim can also be used for editing files placed within an archive such as zip or tar.
What needs to be fixed
As a command-line-based editor, Vim is widely perceived as an editor for hard-core programmers and tech experts. Although this isn't necessarily so (I have many friends who aren't hard-core experts who have switched to Linux and like using Vim whenever working on command lines), it could put off less experienced users.Secondly, because almost every key press has its own action, if you are new to Vim, you can get frustrated with the mess that can be created by accidental key presses. As with any other software, continuous learning and practice is the key.
Bottom line
Being a feature-rich command-line text editor, Vim has a very steep learning curve if you want to explore it to its potential -- but it's well worth it. You won't understand just how powerful, configurable and extensible Vim is unless you start using it.Conclusions
Each text editor reviewed here has its own good qualities. Which you use depends on both your requirements and your own work habits.Vim is undoubtedly best for those -- like system admins -- who need a feature-rich command-line programming text editor. For normal editing, the learning curve is not very high, but for using it as an IDE, a level of expertise is required.
KATE is a good alternative for those who are not comfortable with command-line text editors. It is one of the best GUI alternatives for Vim, although it works best with KDE.
Gedit doesn't compare with Vim and KATE in terms of features but, because of its wide range of plugins and other features, it enjoys a wide following. I personally prefer Gedit when I edit single source files, makefiles and configuration files. I've heard other users say that just after migrating from Windows to Linux, Gedit made them feel home. The only limitation is that it is a Gnome application and is not supported by KDE (although there are some workarounds).
Talking about Nano usually brings up a comparison with Vim. I would say that using Nano or Vim is just a matter of choice. People who like Nano think of Vim as complicated computer, while those who like Vim think of Nano as a piece of paper -- easy to use but not much can be done with it.
My advice? If you are new to command-line text editors, go for Vim (it requires some hard work to learn, but it's worth it), but if you have been using Nano and it suits your purposes, there's no harm in staying with it -- it's definitely easy to use.
This article, 5 free Linux text editors for programming and word processing, was originally published at Computerworld.com.
Himanshu Arora is a software programmer, open source enthusiast and Linux researcher. Some of his articles have been featured in IBM developerWorks and Linux Journal. He (along with some like-minded friends) blogs at MyLinuxBook.
Read more about Linux and Unix in Computerworld's Linux and Unix Topic Center.
Source: http://www.computerworld.com/s/article/9241134/5_free_Linux_text_editors_for_programming_and_word_processing?taxonomyId=122&pageNumber=1