Disable the "clear" after you close VI
Hello,
When I am in vim (on Linux), and I :wq (or anything that will exit me from the vi session) it does a "clear screen". How do I disable this? I've grown accustomed to vi (on Solaris) where is doesn't clear the screen when I exit (which is beneficial to be in the environment I'm in) Thanks, -C |
Look in /etc/bashrc (or some file with 'bashrc' in the name) and in your home .bashrc. Specifically, look for a function that specifically clears the screen after using vim. Also look for something in your PS1 prompt that would cause a clear screen. The function would contain something like 'tput clear'.
You can find out more from the Bash Prompt HOWTO. |
Usually by default on some distro's there will be a clear command in the users ~/.bash_logout
This usually doesn't affect vi sessions though. But I do know some will make an alias of vi or vim to clear afterwards. Make sure you don't have an alias setup to clear after invoking vi. Check your aliases by simply typing alias on a command prompt. |
Solved
I have solved this by putting this into my ~/.vimrc file
Code:
set t_ti= t_te= -C |
Quote:
|
Quote:
I guess this is to be expected if you run a Solaris/RHEL mixed environment... oh well... -C |
All times are GMT -5. The time now is 11:33 AM. |