I tried to search the answer, but maybe I'm phrasing the question wrong, I couldn't find it.
So, in my own Linux environment, when I exit "vi", the content of the editing window stays in the shell window. I cannot just scroll up to see the previous commands I typed before entering "vi". I've been in some environment (as a different user) where once I exit "vi", the vi command just shows as one regular command line following all the earlier commands I typed. I tried to look for the setting for that behavior, which I liked, but I couldn't. Can someone please help me?
It isn't a vi
setting per se; it is in the terminfo entry you use ($TERM
). Check on what your other user has set for $TERM
, and compare that with what you have set. Then, either change your TERM value, or modify the terminal entry you do use. infocmp
decompiles terminal entries; tic
compiles them. You can create your own directory to hold the entry if you can't modify the system one (or while you are testing your modifications):
mkdir $HOME/terminfo
export TERMINFO=$HOME/terminfo
tic -o $TERMINFO new.terminfo.src
Etc.