Introduction
Why Emacs
Emacs is one of the oldest text editors in the world which is more than 50 years old. Emacs usually refers to GNU Emacs, which is also the Emacs in this book. The name "Emacs" comes from "Editor MACroS" and it includes the first letter of the five function keys, `Esc`, `Meta`, `Alt`, `Ctrl` and `Shift`.
Emacs is originally designed to use with only keyboard and has a lot of shortcuts to improve the editing efficiency. As a result, it takes a while to become proficient in it. Emacs Lisp, a dialect of Lisp language, was created to develop Emacs. Lisp is the second oldest high-level programming language born in 1958 with "list" as the syntax and powerful macros. The syntax of Emacs Lisp can be hard to understand for beginners which also makes it hard to learn Emacs. Here is an interesting meme that shows how hard it is:
Then why do we use the old and hard-to-learn Emacs? The answer is: Emacs is highly efficient and extensible.
- Efficient. Emacs uses a lot of keyboard shortcuts to do things. It will be extremely efficient when you have the muscle memory. Though other editors can also binds functions with shortcuts, they don't push you as Emacs does.
- Extensible. Actually this is the one true killing feature of Emacs. Unlike other editors, the Emacs kernel does not impose any restrictions on users and technically you can build anything in Emacs. There are a large number of extensions on the Internet for Emacs with almost all the features you want. You can build your own extensions if they don't meet your needs. Emacs can be light with only basic functions or can be configured as an IDE, and more. There is a joke saying Emacs is not an editor, but an operating system. Here is a meme from xkcd:
Additionally, the shell of Linux and macOS supports some Emacs shortcuts by default. macOS also supports Emacs shortcuts across the system. So it is worth learning the shortcusts of Emacs anyway.
Emacs References
For Vim Users
Emacs has an extension evil that implements Vim modal editing in Emacs. It makes it easy for Vim user to transfer to Emacs. There are also some Emacs distributions that combines `evil` by default as introduced in the next section.
Emacs distributions
GNU Emacs is also called vanilla Emacs that has nothing at the beginning. If you find it boring to configure everything from scratch, there are Emacs distributions for you: Doom Emacs and Spacemacs. Both of them combines evil by default which is especially friendly to Vim users. However, this book only discusses vanilla Emacs.
There is also a distribution integrated with macOS named Aquamacs. It offers the similar interfaces as the other applications on macOS. But honestly speaking, I don't think this is necessary and it breaks the cross-platform operations to some extent.