On 20/02/2019, Todd C. Miller <todd.mil...@sudo.ws> wrote: > On Mon, 18 Feb 2019 09:04:36 +0100, ropers wrote: > >> While this feature/bug is counter-intuitive (IMHO), I presume nvi acts >> this way so as to be bug-for-bug compatible with original vi. (That's >> my guess. I haven't actually confirmed this.) > > You can install the traditional-vi port and compare the behavior > with nvi. I did a quick test and the behavior seems to be consistent.
I too have found out and done the same thing today, and I've also discovered this ex/vi quick reference <http://ex-vi.sourceforge.net/viin/quickref.pdf>, which I believe is from the original authors or contemporaries, and which also documents the ESC-equals-return (sometimes) behaviour. It also, btw., confirms that command-line mode is a separate mode, though it calls it the "Last line" state. See page two of the PDF, first column, "Vi states" section. I personally agree with Sijmen. OpenBSD has always prioritised correctness over legacy compatibility and standards compliance. Instinctively, leaving a slightly "buggy" thing in base on the theory that anyone who doesn't like it should just install larger and less scrutinised code from ports feels wrong. HOWEVER, I've been here long enough to know that "Can't we" rarely conjures patches into existence, and I don't want to be perceived as a whiner who expects others to scratch his itch. HOWEVER, in case this were to fall just to little old me, nobody hold their breath, because I'm only just about after reading ye olde K&R, and I'm pretty much only starting to seriously learn C for real. So while I may well try, I don't know if I will ever get to the point where I can scratch that itch myself and I certainly wouldn't complain if somebody else who shared that pain were to do the scratching for Sijmen and me and everyone on stock vi. I will ask this QUESTION though: Is there anyone here who in any way depends on or likes the ESC-equals-return behaviour? Thanks for your time, –Ian