Lawrence D’Oliveiro
Emacs Versus VIM

I first encountered a full-screen text editor in my first year at University, which was 1979. It was a locally-developed application, built on top of the text-editing-oriented programming language TECO.

Later, in the 1980s, I discovered Unix systems, but for many years I considered them inferior to the DEC systems I was familiar with, particularly VAX/VMS. But when I had to use them, the standard full-screen text editor was this thing called “vi” (of which VIM is a later open-source version).

From the beginning, I considered vi/vim to be brain-dead. The distinction between text-insertion mode versus command mode was a regular source of confusion. Aso, all the other text editors I had been exposed to considered the current position in the text buffer to be between characters (or before the first character, or after the last character), not on a character. But vi had to take the latter approach. This design mistake led to all kinds of unfortunate consequences, of which this is my favourite: press i to enter insert mode, then press <esc> to get out of it. You will find the cursor has moved backwards one position! (Unless you were already at the beginning of the line.) Why is it unable to remember where you were before? Because it can only insert characters after the current position, so it had to move backwards one before entering insert mode. But the beginning of the line is an exception to this, because vi doesn’t treat line-endings like other characters in the buffer—you need to use special commands to insert and delete them.

In spite of these peculiarities, vi was the closest thing to a standard full-screen editor on all the proprietary Unix systems that were so common throughout the 1980s and 1990s. So I stuck with it.

Then, in the 2000s, Linux started to become really popular. And just about every single Linux distro included Emacs among its standard packages. So I decided to start learning about this legendary Swiss army knife among text editors. I discovered it had its own complications (I never bothered to get the hang of those “major modes” and “minor modes”), but luckily it was easy to turn all that off. So now I exclusively use Emacs for my text-editing needs, and in particular for writing programs.

I have to admit I still have a lot of vi keystrokes burned into my finger memory. But I try not to think about that…

  1. ldo17 posted this