bling on software development

when pragmatism meets minimalism

Emacs as My <Leader>, 1 Year Later

Last year, I wrote a Vim Survival Guide for a Vim user switching to Emacs. In that blog post I wrote:

My Emacs setup right now is still not as efficient as my vim/tmux/zsh setup.

I got an email from someone a couple days ago asking whether that’s still true. Rather than replying to him directly, I figured I should blog about it since it would make for an interesting topic.

Well, it started out pretty simple. I used Vim as my text editor, and after switching, I continued using Emacs as my text editor as well. But as you already know, Emacs is much more than that, and slowly over time, unexpectedly, it took over other parts of my workflow that I thought were untouchable.

Asynchronous Eval in Emacs With Stylus and Skewer

You haven’t experienced Emacs if you haven’t experienced the power of C-x C-e. This is the magical keybinding which evalulates the current line. Another useful companion is C-M-x, which evaluates the current function.

Lisp dialects naturally work with these patterns seamlessly, and once I figured out the possibilities of this I got addicted and wanted it available in all of my languages. It’s like having a debugger available all the time. But unlike debuggers where you inspect and change variables at run time, and then need to translate your changes back to code, in Lisp you just edit the code directly and eval (and repeat until you like the result).

Emacs as My <Leader>: Vim Survival Guide

Two months ago I blogged about switching from Vim to Emacs. Today, Emacs is my main editor. I’ll try to keep this post short and to the point, because there is a lot to cover! But by the end of this post you’ll have to answer to the question whether you should give Emacs a try.

What is a text editor?

If we’re just talking about using Emacs as a text editor, then there is no comparison; Vim beats it, period. But is our job description a text editor? No. We are system administrators, software developers, web designers, etc. A text editor is a tool that we use to do our job (or hobby). And any tool should be replaced when a better option is available.

One simple example is grep. As a developer, you can immediately gain a productivity boost by replacing it with ack or ag. Do they search faster than grep? No. But since they’re so good at ignoring things (like your .git directory) that for practical purposes they end up saving you a lot of time.

As a text editor, I think Emacs is quite terrible. Its key bindings are notoriously bad to the point that something called Emacs pinky exists. If you’re an Emacs user not interested in Vim bindings you should seriously consider taking a look at god-mode or control-mode. But where Emacs really excels is all of the things outside of text editing.

Emacs is a great operating system, if only it had a good text editor.

Well, the nice thing about an operating system is that you can write a text editor for it; that text editor is called evil-mode.

Now, as a text editor, Vim is still better than evil-mode for obvious reasons, so if you’re just swapping it out you’re at a net loss of productivity in terms of text editing. However, what you gain from all of the other things that Emacs can do far outweighs the missing features.

Emacs as My <Leader>: Evil-mode

Hey guys, I just wanted to post a quick demo video on evil-mode.

The video is targetted at intermediate/advanced Vim users, so if you’re just starting out you might miss some things. But…hopefully it’ll be an enjoyable watch regardless!

Let me know what you guys think of it!

Vim in Emacs Bootstrap

Did I wake up on the wrong side of the bed?

My New Year’s resolution for 2013 was to learn Vim. I was so new to Vim that I did not even know how to join lines properly. However, I was diligent, patient, and stubborn enough to stick at it. It didn’t take long for me to fall in love. I even ended up writing a plugin for Vim that got so popular that I was writing VimL as a second job.

Sounds like I’m pretty happy with Vim (and I am), so why am I trying Emacs?

Curiosity is a major reason. But more I think the philosophy of Emacs fits my personality better. The Vim community is very much divided into two camps: the text editor people, and the people who try to turn Vim into an IDE. I am in the latter. My vim distribution has over 90 plugins. While I haven’t yet run into Vim’s limitations of trying to use it this way, I can already see the walls coming up…

But here’s the thing, I’m addicted to modal editing, not Vim.