Catch me code

Power Editors (Vim Revisited)

This is in part a follow up post to the is learning vim worth it post. I think I went about it the wrong way evaluating vim.

I’ve been trying out intellij as a replacement for eclipse on my day to day work. Intellijs design is to be keyboard centric. Having tried out vim and intellij as keyboard centric editors made me rethink the whole post.

Go shortcuts, go!

Shortcuts really are the future of programming. This might be pseudo-psychological, but the mouse is a highly passive device (when it comes to code). Reaching for the mouse when programming isn’t really as much about the time lost or gained.

Its about the mental context switch going from typing to passively clicking. The mouse stops this flow – not for long, but a fraction. And that fraction drains on your flow. I did underestimate this flow-disruption until having tried to not use the mouse full out.

Vim and flow

Vims genius is in using regular keys for most of its movements and editing. The [a-zA-Z0-9] keys will always be there. All other keys are optional and can’t be counted on being there or working. I’m convinced that that’s why vim is on every device – most of its keys will be present on any input device.

The genius is in using the same keys for both insert and editing actions. Because they are smack in the middle of the keyboard you save disruptions and flow. Again a micro fraction of your flow will be disrupted when reaching for ctrl + alt + shift f7 combo.

What is this power editor you speak of?

So, before revisiting the original question: let’s first define what a power editor is:

  • Should support your workflow with ample shortcuts
  • Should minimize the keystrokes (and have low to zero mouse clicks in that workflow)
  • Should fairly reusable and language independent (i e not too specialized)

Or summarized in one phrase: minimize the mental context switches and flow disruptions from thought to fresh smelling code.

Is two modes ok with you?

So – is vim worth learning? Vim is definitely a power editor so I’m going to rephrase the question: Can you get your head around using two different modes for editing?

If this feels natural for you – then do learn vim. I think its alleged learning curve is really a reflection of that question. Many (including me) are not used to the same keys bearing different meanings when being in different modes. That’s why its “hard” to learn.

Any power editor with editing capabilities at the granularity of vim is going to take time to learn. The amount of key-combos will be roughly the same, its just how you input them to the editor.

Conclusion

Should you be fluent in at least one power editor? Definitely. You’ll recoup the learning period plenty by having the fastest way to test-drive things.

Comments