emacs and vi: Science of Command Efficiency
Components of Keyboarding Science
- key layout efficiency, that's your QWERTY vs Dvorak
- keybinding layout efficiency. Given a set of commands, what's the most efficent mapping to key as to optimize ergonomics? That's your GNU Emacs's Keybinding vs, say, ergoemacs-mode
For much more of the above topics, see: Keyboard Layout Design ⌨
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:
- move cursor up/down/left/right
- delete character left/right
- move cursor by word left/right
- delete word left/right
That's the most basic 10 editing commands you need. 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.)
transpose-chars a worthy command when you can only have a handful?
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? (For example, 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:
- ① letter key layout efficiency
- ② keybinding layout efficiency
- ③ command set efficiency
Problem ①, the key layout efficiency, is a solved problem. (see: What's the Most Efficient Keyboard Layout? Dvorak?)
Problem ②, the keybinding layout efficiency, is mostly solved. See:
- Emacs vs vi: How to Compute a Keybinding's Efficiency?
- Keyboard Layout Design ⌨
- xah fly keys
Problem ③, on command set efficiency, is related to problem ② about keybinding layout efficiency. Because if you have a bad command set to begin with, doesn't matter how you arrage their keybinding, your overall officiency will suffer. (imagine if your command set doesn't have
I've studied many aspects of command efficiency but don't have a comprehensive and or systematic picture on what or how.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard: Best Keyboard for Emacs
Ask me question on patreon