Thursday, November 22, 2012

The single most reason that keeps me using Vim

I've wanted to use all new and cool Code editors that have come around in past few years. Many times I have switched to them determinedly, only to switch back to Vim after a few days. All the fancy features that I see in the screencasts of these code editors are irresistibly inviting. Yet I can't let go of Vim. After thinking a lot about it, I think it boils down to one single reason.

The h-j-k-l-b-e and Ctrl+w, Ctrl+u, Ctrl+d key sequences.

These are key sequences for moving around inside a code window and then switching between multiple code windows. They are what I use the most in Vim (except for typing actual text). Over years my muscles have deeply memorized these keyboard movements. Every other code editor forces me to use arrow keys or mouse to do these navigations. I cannot get used to it even if I try it for a month. Therefore I switch back to Vim.

Of course I diligently install the Vim emulation plugins that come with the respective new code editor I am trying. But the code navigation key sequences are so frequently used that even a slightest departure from the original Vim behavior creates a lot of cognitive friction.

I'm not saying that h-j-k-l is the most intuitive way to do code navigation, but once your fingers memorize those movements it seems impossible to find anything else that can feel as satisfactory.

No comments: