As I mentioned awhile back, I've switched from Vim to Emacs. Vim and Emacs are both text editors. If you don't think text editors are awesome, please go read the first half of "A Hymn to Vim," wherein the discerning reader may discover the glories of pure text. When you get to "Why Vim? What I like best …", you can come back. Or actually, go straight over to Org Mode, and find out how plain text can dance.
Still here? Then you know how unusual it is to go from Vim to Emacs.
At least, it seems unusual. I found several articles about leaving
Emacs for Vim (and many more articles by Vim people about how awful
Emacs must be), but I had a hard time finding tales of people
leaving Vim for Emacs. Though, I do see allusions on the org-mode
list. Maybe Emacs people don't like to blog about it. Or maybe I just
had a bad search day.
Anyhow, this is why I switched.
vi Lightning
"Emacs vs. vi" is supposedly an ancient feud, the venerable Editor War. Considering that Unix time only began in 1970, maybe we geeks have to take tradition where we can get it.
But notice I wrote vi, not Vim.
True, what first got me excited about Vim were the best parts of vi:
the magic of modal editing and single key commands. Here, at last,
was a language of mastery over text, potent and preternaturally
fast. You could craft whole commands, like go back two words and delete to the end of the line, and compress them into a single word:
2bd$.
Well, <Esc>, and then 2bd$, and then i or a to get back to
Insert mode. But still. Lightning.
Vim(Outliner) Magic
However, as I used Vim, my excitement soon hinged on features like
syntax highlighting and color schemes. And then I started adding
things: magical snippets to .vimrc, incomprehensible but effective
scripts from www.vim.org. Before long, I was trying to browse the Internet
from within Vim. That one didn't work out.
What did work out was VimOutliner. Wow. What a sweet outliner. Of all
the scripts I ran on Vim, VO was king. Sometimes it felt like I was
running VimOutliner, and opening a Vim buffer when I needed it. That
vi lightning could now blast whole trees of text. I wrote as much as
I could in VO files. I even tweaked the script so that colorschemes
would work, and I could see my outlines in glorious inkpot (or
whatever).
I enjoyed and relied on Vim and VimOutliner for years, and nothing will ever change that. They were a free gift, a collaboration from so many people I'll never meet. If you are one of these people—thank you. So much. I will always be grateful.
So why switch, then? Well, the astute reader may have noticed that all
this "vi(m)" goodness was entirely parenthetical—you couldn't do
any of this in plain vi. Where was my youthful asceticism? My
delight in the clean lines of sheer modal editing?
Of course, that's the whole point of Vim: you can have all that addon emacs-y goodness and remain a fierce, modal monk. Best of both worlds. In theory. But what if the fountains of addon goodness ever went dry?
Trouble in addon land
Meanwhile, I had a problem. I was trying to clock my work intervals, and every program I tried made it almost impossible to correct mistakes. It was like punching a time card. Oh, you left it running while you switched tasks, did you? Well, I'm sorry, Mr. Powell, the log files are etched in granite—or at least, deep in an ugly database. One CLI app was sensible enough to store the intervals in a plain text file, but … in epoch time. Great. Apparently, if you weren't geek enough to convert your missed afternoon break time to the number of seconds elapsed since 1970, in your head, you didn't deserve to correct your record.
Of course, I could write some script to do this conversion for me. But why stop there? What if could clock my work intervals in a big VO file, with proper, human-readable datestamps? So I tried to extend VO. My knowledge of VimScript was minimal—well, rudimentary—well—nonexistent. I forged ahead, of course, and cobbled together something that did a decent job for multiple years. Strangely, though, it was clunky and limited. And needed a shell script (eventually improved to Perl) to process it.
Where to turn for help? VimOutliner had (has) a sporadic but spirited mailing list. Surely, since they knew what they were doing, they could clean this up in short order. Vim could do anything…couldn't it?
To be continued…