Skip to content

Introduction to Professional Text Editors

Posted on:September 5, 2016 at 02:36 AM

2020 remark: This article was first published in 2016 under the name Vim resources (and other text editors).

It’s been 4 years since this article was first published yet the landscape of text editing remains the same, everything follows still valid.

Text editor is the most important tool for a programmer. Period. It is pretty much like a sword in the hand of a warrior. There can be many kinds of different swords, each with its own pros and cons, but at the end of the day it has to be the one that is right to its user.

I’ve used several text editors over the years, most of which are quite famous. To cut to the chase, in the end I’m switching to Vim and would like to share resources for those who would like to swtich too.

But before we go there, let’s review other text editors out there.

Stock text editors

Professional text editors

Every editor from here on has all the features you would expect from a professional-grade text editor such as syntax-highlight, code auto-completion, recordable macro, plug-ins, built-in file browser, version control integration, command line integration etc.

Vim and Emacs

All the above professional text editors are solid enough to be your text editor of choice. They’re modern, feature-rich, and extensible. So what is the problem?

The problem is the workflow. While these editors are good, they are still needed to open up as another program. Sometimes it’s better to stay inside your command-line terminal rather than to switch to another window. The other problem is that they are designed to use with modern mouse and keyboard setting. Surprisingly, switching from keyboard to mouse frequently can be quite frustating. Not to mention that in some situation you cannot use GUI-based text editor at all (SSH session is a popular case).

Because of this many people have switched back to the eldest text editors around: Vim and Emacs (and for some, Nano). They operate purely in text-mode which requires no mouse interaction. Their learning curves are quite steep compared to modern editors but experience users can use them so efficiently that put modern editors to shame. It is interesting to note that Emacs and Vi have history of being a rival, both with a large group of users claiming their editor of choice to be better than the other. I have only little experience with Emacs myself but I can say that its extensibility is far beyond a text editor. (Emacs’ Org-mode alone can acts as a todo-list, outliner, note-taker, project management, all in one package, for example.)

As of late I’ve been switching to Vim as my default text editor for everything. Even though I am quite familiar with it for many years, I’ve been put off by the need to memorise all of its command keys. For those of you that do know about Vim, it is an improved version of Vi editor—a command-line only text editor that has been around forever. Vi and Vim are labelled as a notoriously hard program to quit (mainly because no novice can correctly quess how to quit it using :q! command). However, once I started to accomodate a few essential commands, the rest followed surprisingly easily. The best part that I like about Vim, which is also the main reason I switched from Atom, is that it is extremely lightweight. You can open and close a Vim session nearly instantaneously, with the speed limits by the speed of your own typing. This lightning fast and feather-light footprint stunned me (who used such a heavyweight system like Atom—please remember that it runs on the Chrome frame). I must admit that I missed the convenience and beauty of Atom at first, but after I started to customise my Vim, I must say I never look back ever again. With the right customisation, Vim can be as beautiful and convenient as any modern browser.

Vim is one of those software that grows along with its user. New users start with a fresh Vim. Mature users however grow their own Vim to be completely different monsters.