|The stupid question is the question not asked|
Comment onby gods
|on Feb 11, 2000 at 00:06 UTC||Need Help??|
I thought it was funny and a bit sad that "ESC ESC ESC" was mentioned in the vi tutorial. The only advantage of "ESC ESC ESC" over "ESC" is that it beeps at you after exiting insert mode.
You enter "beep mode" by typing ESC (an odd number of times) when you aren't in insert mode (but this doesn't happen to me since I use a Real® OS where function keys don't send ESC sequences).
If you type ESC, then there is a pause while vi waits to see if it is the start of an escape sequence or is just a plain ESC. If you type something else during this period, vi looks if the sequence is an ESC sequence for a function key (or other special key), probably finds that it isn't, and so then processes the ESC as a single keystroke (which produces a beep since there is no function for ESC when in 'nav mode').
So beep mode is caused by people hitting ESC *one* too many times and then cycling through hitting ESC more times to try to figure out what mode they are in. If you simply wait several seconds, the beep mode passes.
Note also that any vi produced in the last decade can show you when you are in insert mode so you don't have to hit ESC trying to figure out whether you are in insert mode or not.
In reply to Re^2: Learn vi/vim in 50 lines and 15 minutes (beep mode)