Learning Viper
Vi for Emacs

Refining one’s toolset should be a lifelong commitment.

Emacs Rules

I used emacs for years while at MIT. It’s just part of the local culture. 6.001 is taught in Scheme, and emacs is a required tool for the class (and the entire course 6). So while I never became a guru at emacs, it was an indispensable tool for me. I continued using it as I moved into the professional world. My coworkers were using IDEs, while I was fluffing up my emacs with IDE-like packages.

And above it all, I agreed with the emacs philosophy. Emacs may be bloated with unused features, but the core design makes sense to me. I say this even as a committed C programmer.

Life was good.


Then about 8 years ago, RSI struck. I know it’s a standard joke, but all the C- and M- over the years took their toll.

I tried to recover with Ergoemacs. But the problem isn’t the location of the letters used (which is what Ergoemacs shuffles around); it’s all the C- and M-. Years before, I had developed a habit of rolling the side of my left hand into the Control key (essentially giving myself 6 fingers on the left hand). This, I think, let me push the RSI out by some years since I wasn’t straining my pinky to reach. (This is also why, to this day, I hate low-profile laptop keyboards. I’m looking at you, Apple.)

So Ergoemacs wasn’t cutting it, and I was starting to freak out about my career. It was at this point that I seriously started paying attention to my vim-using coworker. He was fast, and his hands never seemed to leave the home row. This is what I needed.

Err… Vim Rules

Long story short, I converted, flailed about for some days, but then became productive and my RSI resided. And that’s where I’ve been for the past 8 years. My job and passion is to make good software, not become an evangelist for an editor, so I came to the same plateau I reached with emacs: Functional, with a tuned .whatever file.

Shake it up a bit

I could continue as-is, however:

  • Emacs has the right design, even if all the keybindings are crap.
  • Emacs integrates with Lisp coding far better.
  • Emacs has useful tools like Org.
  • Emacs server.
  • Tired of pragmatic, want some intellectual.

But of course there’s that RSI / emacs-has-crap-keybindings problem.

Oh look, vi keybindings for emacs. M-x viper-mode. Happy times.

Viper Problems

Well, happier times, but not yet ideal:

  • Gets confused with too many Esc.
  • Sometimes pops out of Vi mode for reasons I haven’t yet figured out.
  • C-u C-u reverses direction and redoes. (Reprogram brain to use C-u . . .).
  • Missing *.
  • Missing zz (to center).
  • Missing C-w C-w to switch windows. Instead this cuts and mangles my document.
  • Miss visual mode of vim (perhaps try “evil”?)


It looks like EVIL is the designated successor to Viper. Have not yet tried this.


I now have this in my .emacs:

(setq viper-mode 't)
(require 'viper)
(require 'viper-in-more-modes)

See viper-in-more-modes.

Updated October 23, 2014