on vi Keybinding vs Emacs Keybinding

, ,

Here's a keybinding design for vi. It is based on the principle that most frequently used commands be placed on the most easy-to-press keys.

ErgoVim Key Mappings By Harrison Ainsworth. @ www.hxa.name…

At one point in my hand health crisis, i was planning to do this in emacs.

vi is a great alternative to healthy keys, but, there are 2 major issues:

① Due to the modal ways, you have to constantly switch mode. Solution is to change Esc to some easy key such as Alt or Caps Lock.

The modal way is actually efficient, and the reason for that is because, half of the time the keys pressed by programers are editing commands, not data entry. (according to emacs key statistics 〔☛ Emacs's Command Frequency〕) So, that means, every command you call is simply a single key press, instead of a key combo or sequence. This saves you significant amount of finger strain.

② vi keys is by historical happenstance, just like emacs. There is absolutely nothing about it being ergonomic. Most of its keys are simply mnemonic, like emacs, such as $ for moving to end of line, due to that char as regex to match end of line. And the famous vi arrows the {h j k l}, came from the terminal hardware.

terminal ADM-3A keyboard
terminal ADM-3A keyboard, where Bill Joy used to create vi. Note the arrows on {h j k l}. 〔☛ History of Emacs & vi Keys (Keyboard Influence on Keybinding Design)

The origin of the choice of {h j k l} on that keyboard hardware is again by ease-of-implementation, not by design optimization. (See: History of Emacs & vi Keys (Keyboard Influence on Keybinding Design))

A better set of arrows, would be {i j k l}, forming a inverted T shape.

Solution is to design a ergoemacs vim mode. So that, the most frequently used commands, by statistics, are assigned to the most easy-to-press keys (such as home row keys). Also, vim has many key baggage. Many commands have more than one keybinding, and there's no consistency.

But, if you don't type that much as data-entry clerks do, it doesn't really matter. It's good enough. 〔☛ How Many Keystrokes Programers Type a Day?

Also note, the modal way being efficient, isn't out of vi's design. vi happened to be so-called modal, because back in 1970s, you interact computer by giving a command, then tell the computer to update screen, thus the “editing mode” and “command mode”. That's why, as late as 2008, in emacs manual, emacs still introduce itself as “real-time DISPLAY editor” — it updates the screen as you type. (see bottom of: GNU Emacs and XEmacs Schism)

Ergoemacs vi Mode

I actually created a ErgoEmacs vi mode. Been using it for a month now. Splendid. See: Ergoemacs vi Mode

blog comments powered by Disqus