Solved vi (nvi) :esc

I didn't find the answer, so must post there.

I use vi (nvi-2.1.3) which is in a base and I found confusion.
If I print colon ( : ) and then press Esc then some window (buffer) opens in a bottom of vi editor.
There is no such thing in vi 1.79, but is only in nvi2.

rtreterterterte.png
.

I later realized that whis window is a history of ex commands typed earlier.
But I don't want use this feature because I can type colon by mistake and than I want to exit back to command mode with Esc similarly I do when exit from insert mode.
And I don't want to use ex history.
How I can remap or disable this feature?
 
Just learn to hit the escape key often (twice or even three times in a row) so you don't 'accidentally' hit the wrong command at the wrong time.
 
Just learn to hit the escape key often (twice or even three times in a row) so you don't 'accidentally' hit the wrong command at the wrong time.

so
I am in a vi
I am in a command mode
I press colon and press escape five times
I am in a buffer
I can quit from it only with :q
discomfort
 
Don't hit keys, any key, besides the escape. Almost all keys have commands mapped to them in command mode. Vi/vim/nvi is quite unforgiving when hitting the wrong key at the wrong time. This is one of the reasons why vi/vim has such a steep learning curve.
 
You're looking for the cedit setting I think. Try using: :set cedit="t" while in vi, you'll notice that it won't open the buffer whenever you hit escape after using :. I just used 't' to test this, this is probably not the best setting, you'd have to do some research there.

These options can be set as default using ~/.nexrc.
 
You're looking for the cedit setting I think. Try using: :set cedit="t" while in vi, you'll notice that it won't open the buffer whenever you hit escape after using :. I just used 't' to test this, this is probably not the best setting, you'd have to do some research there.

These options can be set as default using ~/.nexrc.

or set a variable NEXINIT=":set cedit='t'"

yeah! That's what I was looking for (I searched in man page for "history", but didn't spot this parameter).
Thanks!
 
Back
Top