Having used Emacs for two decades, I never thought that I would switch to another text editor. I̵’̵m̵ ̵l̵u̵c̵k̵y̵ ̵t̵o̵ ̵r̵e̵a̵l̵i̵z̵e̵ ̵S̵u̵b̵l̵i̵m̵e̵ ̵T̵e̵x̵t̵ ̵3̵ ̵i̵s̵ ̵a̵ ̵b̵e̵t̵t̵e̵r̵ ̵a̵n̵d̵ ̵m̵o̵d̵e̵r̵n̵e̵r̵ ̵p̵r̵o̵g̵r̵a̵m̵m̵i̵n̵g̵ ̵e̵d̵i̵t̵o̵r̵ ̵t̵h̵a̵n̵ ̵G̵N̵U̵ ̵E̵m̵a̵c̵s̵ ̵i̵n̵ ̵t̵h̵e̵ ̵2̵1̵s̵t̵ ̵c̵e̵n̵t̵u̵r̵y̵.̵

Update on June 2020: I switched back to Emacs for these reasons: 1. ST3 lacks Terminal support and takes too much x11 protocol bandwidth. Emacs is much easier under WFH situation. 2. Now I can hack ido mode to switch to a source file with auto-completion within a project. This is the most-needed ST3 feature I missed in Emacs 3. I still give up on etags, but I realize it’s not very important for a C++ project with proper namespacing — ALSO I heard LSP mode is better, but still no time to learn it. :-( Remember that editor is just a tool, not a religion!

Firstly, What’s Good about Emacs?

Don’t get me wrong, GNU Emacs is still a great editor once you know it.

In particular, getting familiar with Emacs key bindings is rewarding. You can use Emacs key bindings (ex: Ctrl+a/e/d/n/p/b/f/k/v/t/…) everywhere even outside of Emacs.

bash —The author of bash, Brian Fox, was also a maintainer of Emacs. So it’s not surprising that Bash fully supports Emacs keys. You can even use isearch (C-s, C-r) to search pattern inside bash history.

gdb.

The CPython and IPython interactive shell.

Most Mac OS X applications —Thanks to the fact that OS X mainly uses Command key instead of Control key in keyboard shortcuts, Emacs key binding (defined in 1976) is compatible with OS X key bindings. For example, I can use Emacs key bindings when writing this blog in Chrome browser on my Macbook.

To activate Emacs keybindings in OS X, install Karabiner-Elements, and enable “Emacs key bindings [control+keys]” and “Emacs key bindings [option+keys]” Complex Modification rules.

Of course Emacs has more advantages than ubiquitous key bindings. I cannot make a comprehensive list here. These old-school editors have expanded people’s view about what an efficient editor tool can do:

Flexible buffer management

Flexible window splitting

Interactive search, occur mode (M-x occur), and grep mode (M-x grep)

M-x replace-regexp

dired-mode is arguably easier to use than Finder on Mac OS and File Explorer on MS-Windows.

Outline major and minor mode (You can use Outline minor mode in C++ and Markdown mode)

Easy to invoke shell command, pipe shell output into a buffer, or even open an full-fledged color terminal (ansi-term) inside a buffer.

Truly portable — Mac Window mode, Mac Terminal mode, Linux X11 Window mode, Linux terminal mode, etc

Terminal support — emacsclient + terminal muxer (like tmux) gives you a complete workspace at remote machine

The old Emacs Lisp, albeit flawed, can do more customizations than most modern packaged software can do. Here is my .emacs configuration that can do a lot of fancy tricks.

The beyond-the-times powerful Lisp machine in Emacs has also inspired a generation of best programmers in the 80s and 90s.

The key developer of Netscape and first proponent for open-sourcing Mozilla web browser, Jamie Zawinski, created an once-popular Emacs fork called XEmacs. James Gosling created Gosling Emacs and an Emacs Lisp clone before he invented the Java Programming Language. GNU Project started from GNU Emacs and GCC. Brian Fox created the bash shell and was once a maintainer of GNU Emacs. Too many Linux hackers to name are enthusiastic Emacs users.

What’s Bad about Emacs?

When I started to learn Emacs in the late 90’s, it was unquestionably the most advanced text editor at that moment. However, this 42-year-old editor is starting to show its age:

Code Navigation

The code analysis tool (etags) doesn’t support popular languages such as Go and JavaScript (although third-party packages are available). Even for supported languages, it doesn’t always produce accurate results. And it doesn’t support ‘Goto References / Show Callers’ .

2. Code Completion

It’s tricky to set up auto-completion in Emacs. The most reliable method that I know is using TAGS as symbol source. It’s not sophisticated enough to understand C++ class hierarchy, and you need to keep the TAGS file up-to-dated manually.

3. UI Customization

If you’re using a custom color theme, you usually need to fix some font faces after installing a new major mode.

It’s hard (if even possible) to add “modern UI element” such as side bar and tab bar.

Most parts of Emacs is written in Emacs Lisp, which gives us an illusion that we can customize Emacs to do anything — but in reality, this is usually impractical.

Sometimes it’s even difficult to do simple UI customization. For example, You need to write mysterious Lisp just to change editor font:

(custom-set-faces

`(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height ,(* font-height 10) :width normal :family "DejaVu Sans Mono" :embolden t))))))

4. Steep learning cuve

I wouldn’t recommend anyone to learn Emacs anymore — it’s not worth the time. For example, assume you want to enable spell checker in Markdown mode, you need something like

(when (require ‘markdown-mode nil t)

(add-hook ‘markdown-mode-hook

(lambda () (flyspell-mode))))

In this simplest example, you need to understand why you need ‘require’ before accessing ‘markdown-mode-hook’. You need to know what mode hook and lambda means. You need to check ‘require’ is successful if you want to share this .emacs file on machines without installing ‘markdown-mode’.

On the contrary, you just need one line in Markdown syntax-specific setting file in Sublime Text 3:

{

“spell_check”: true,

}

Unlike 1980, programming is a much more complicated task in today’s world. We have too many things to learn. People should spend time on more important stuff rather than tinkering their editor anymore.