What really makes Emacs unique is the fact that it is a text editor with an embedded Turing-complete programming language. It’s infinitely customisable, and so allows you to arrange it according to what makes you personally productive.
But this post is not about philosophy. I’m dedicating this post to a laundry list of features that make Emacs better than any text editor/IDE/administration tool out there. (Some of them can be found in the Emacs guided tour.) I’ll try keep this post updated as I think of more features.
- Regular expression builder
- Keyboard macros
- Unloseable undo
- Interactive search-and-replace across directories
Update 09 Jul 2007:
As you type a regular expression, every matching substring in the current buffer gets highlighted, and each submatch of the regular expression is highlighted in a different color. To use:
These allow the recording of a sequence of keystrokes to be replayed later. Anything possible to do in Emacs is possible through the keyboard, so this feature is quite powerful. It’s especially useful for tedious reformatting tasks.
C-x (, perform the actions you want to record, then
C-x ) to stop. To run the keyboard macro at any time, use
In any editor I’ve ever used, if you Undo several times, then type some, the stuff you undid cannot be redone. That portion of the undo history is lost. In Emacs, this is not the case: it is always possible to get back to any previous state of the buffer of text.
Say you need to rename most occurrences of a pattern, but not some. You won’t be able to use a perl -pi or find+sed since you need to exclude certain occurrences. What you need is an interactive process that lets you look at each match, and decide whether to replace.
To use: look here.
Update 28 Jun 2008: I recently ran across a top ten list of emacs features. It’s quite useful.