ErgoVim Key Mappings

Harrison Ainsworth

Summary

This is a mostly comprehensive rearrangement of Vim's key mappings, to be more spatially ordered and modernised. It reassigns almost all normal, visual, and insert mode keys. The principles are to: group related commands on nearby keys; select the most important commands for the best positions; adopt some common standards from outside.

Contents

Description

Probably the first thing one learns in Vim is the cursor movement keys. One of the principles, and virtues, of Vim is clear straight away: put the commands right under the fingers. Yet when you put your fingers on the keyboard you find something wrong: the commands are not under your fingers after all, but off by one to the left! Oh.

Would it not be better if the movement keys were i,j,k,l – making the familiar ‘inverted-t’ shape? Almost completely. The only problem is the inertia of convention – which accreted around rules now obsolete. But if you are a new user of Vim there is no need to be constrained by that. And from this change follows the rest.

The single major deficiency is that the help files are not updated to match. But it is easy to look up the original commands in the new reference list, or search the reference list for original commands.

Spatial ordering

Spatial grouping is a simple and flexible way to create order, and order enables understanding, learning, and memory. Each set of related keys forms a higher-level module: learning each key strengthens learning the others, and the abstraction allows a choice of members. Alternative orderings are weaker. Choosing commands by mnemonic letters overconstrains the layout, and will be either incomplete or arbitrarily forced. Reusing established conventions and patterns will be incomplete, and for Vim the bases are now forgotten.

The principles are:

Group related commands together on nearby keys.

Make important commands easy to reach.

Ignore mnemonic-letter choices.

Adopt the common standard uses of x,c,v, and z

Use only shift and control as modifiers, to permit portability, and allow use of other OS-UI-dependent standard short-cuts with alt.