Hi, ropers wrote on Wed, Feb 20, 2019 at 09:58:06PM +0100:
> Imagine a legacy automobile where the break pedal > accelerates if the car is in neutral, Your analogy is not quite to the point. In vi(1), the escape key, in general, means "change mode", for example from input mode to vi command mode - or, as another example, from ex command mode to vi command mode. It does not, in general, mean "abort", "cancel", or anything like that. Let me give two parallel examples. In both cases, i first start up vi(1) on a test file. Variant 1: I then hit the "a" key for the vi(1) "append input" comand, type some words or lines, hit the escape key, and quit with ":wq". The file has changed. Variant 2: I then hit the ":" key for ex(1) "command input" mode, type a complete ex(1) command (e.g., "d 2" to delete two lines), hit the escape key to exit ex(1) command mode, and quit with ":wq". Voila, the file has changed again, just as above. Now, if you hit ":", type an incomplete or invalid ex(1) command, then hit escape, it indead amounts to aborting your ex(1) command mode without executing any command - but that doesn't mean escape means abort. It is only a consequence of the fact that no command can be executed when there is no valid command in the first place, and to exit a mode without having entered anything useful in that mode reasonably means that the mode took no lasting effect, maybe except for presenting a diagnostic message to user. > To repeat my earlier QUESTION: > Is there anyone here who in any way depends on or likes the > ESC-equals-return behaviour? Personally, i don't care greatly either way. But i certainly don't see any inconsistency or surprising behaviour here, and hence no motivation to change the established behaviour. Yours, Ingo