emacs and vi: Science of Command Efficiency

By Xah Lee. Date: . Last updated: .

Components of Keyboarding Science

but, there's 1 more: command efficiency.

Science of Command Efficiency

Let's say you can only have a fixed number of commands, say 30. What is the most efficient command set? For example, you'd need:

That's the most basic 10 editing commands you need. And, 30 - 10 = 20. You can have 20 more commands.

You'll want commands to move to begin/end of line. A command to insert/remove comments. Command to toggle letter-case, perhaps. Do you need a command to insert a line return BEFORE cursor too (in emacs, this is open-line). Should you have a back-to-indentation command? Is kill-line more efficient or kill-whole-line, if you can only have one? 〔see Emacs: Single Key to Delete Whole Line

(why are we interested in restricting the number of commands? Because there are only 30 or so easy-key spots on a keyboard. So we need to pick a good selection of commands that are most versatile and efficient. Otherwise, you could have 10 thousand commands, but each requires lots keystrokes to invoke.)

is transpose-chars a worthy command for our budget?

should moving by word always have cursor end at the beginning of the word (as in vim), or should it depends on the move direction (as in emacs)? 〔see Text Editor's Cursor Movement Behavior (emacs, vi, Notepad++)

also, should you have a system where repeated call of a command result in different behavior? (e.g. emacs's recenter-top-bottom), or, should commands always have the exact same behavior, augmented by a universal-argument system as in emacs? (or, should you have both in a mix? but, would a single consistent system possibly be better than mixed style?)

so, this is the science of command efficiency. Most visible as vi and emacs command set differences.

so, in summary, again, the science of keyboarding are:

Problem (1), the key layout efficiency, is a solved problem. (see: What is the Most Efficient Keyboard Layout? Dvorak?)

Problem (2), the keybinding layout efficiency, is mostly solved. See: Keybinding Design ⌨

Problem (3), on command set efficiency, there is no research on it, as far as i know.

I've studied many aspects of command efficiency for over 10 years but don't have a comprehensive picture.