I am and have always been a Vim user. Why on earth am I writing this post in Emacs?

Okay, I haven’t always been a vim user. I didn’t know vim existed until about eight years ago, but ever since that time, vim has been my editor of choice. It’s not hard to see why: after you have finished climbing the learning curve cliff (a practice that takes at least a year), you start missing vim’s modal style editing everywhere else that you edit text. Want to replace all the text up to the comma? Well, that’s just a matter of typing ‘ct,’ (easily memorizable as “Change unTil ,”) while in vim’s “normal” mode. Want to delete the next three paragraphs? That’s ‘d3j’. Everything in vim is a command, a optional number of times to repeat that command, and a motion.

Okay, so if vim is so great, why use Emacs? Don’t I realize that the two editors have been locked in a holy war since the time of Christ or something?

Vim’s modal style of editing, it’s concept of a “text object” and commands applied to motions is awesome. Emacs can do all this, but it all feels, well, kind of klunky. The key for a word text object changes from one context to another, and never seems to be vims simple “w”. But, vim has some flaws, and while they aren’t enough for me to abandon it, they are enough to make me want to explore other things.

  • Vimscript sucks. Even dedicated vimmers admit, vimscript sucks
  • Vim’s implementation is tied very intimately to being a console based editor. There is no way to do something like Emac’s Org Mode Babel extension in vim, with graphviz compiled dot graphs appear in line with the text document.
  • Even Shougo’s Unite plugin feels ungodly sluggish compared to Emac’s comparable Helm package.
  • In the age of packages, trying to reconstruct a Vim config on another machine is a bit painful.

Okay, so why Emacs? Why not Atom, or Sublime? Those are the hot trendy stuff right? Well, the biggest reason is that those tools are the hot trendy stuff. We have had two editors passed down to us from the long long ago, that have stood the test of time and that people continue to use today even though they have long, long since ceased to be the hot new stuff. They both have working implementations on every OS, both in GUI and terminal form. Neither is going anywhere.

Atom? Sublime? Who knows how long they will last? What happens to Atom and Sublime when they are no longer the hot new stuff? This is going to sound weird to non-programmers, but text editors require a substantial investment of time to learn to use well, and that time frame is measured in years. I know, I know, you can do everything we can do in Vim and Emacs in Notepad, given lots of patience and a mouse. But a sophisticated text editor, fully learned, lets you change things at the speed of thought, and decouples the speed of your changes from the amount of text they manipulate. But acquiring that skill takes time. Years. And I don’t have the patience to invest years in learning how to be really, really good at Atom or Sublime when I doubt they will be there in years. Vim and Emacs have been around for decades. I have never ever regreted learning to be good in Vim but…

But I’ve learned all the Vim I care to know. There is more to learn, but the things I have left to learn largely seem to be trivia, things vim can do that don’t seem useful to me. Time to learn something new, but something still worth knowing.

Time to learn Emacs. For years I’ve been jealous of Org Mode and of the promise of your editor essentially replacing your operating system. That should make any programmer salivate. I don’t mean literally of course, but there is truth to the old joke that Emacs is a decent operating system that lacks a good text editor. It has it’s own programming language (Emacs LISP), it’s own spreadsheet (Org Mode), calendar (Org Mode), project planner, web browser (EWW), email (multiple actually), newsgroup reader, calculator, shell, and even half a dozen or so built in games. So the promise is, learn this editor, and I can do everything that involves text manipulation in an editor that I know.

Of course, all that is antithetical to Vim, which has the more Unixy philosophy of “do exactly one thing and do it really well.” But I’m not saying “To hell with Vim.” I think I will always prefer Vim’s easy mnuemonics and modal editing to the complex and inconsistent keychords of everywhere else. But I’m not growing as a Vim user anymore, so it’s time to expand my skills.



blog comments powered by Disqus

Published

21 March 2018

Category

Personal

Tags