When I type vim filename, vim opens and I edit the file. When I close it, the part of file that was present on the display while I was in vim still shows up at the display, and all the previous terminal display gets scrolled up. How to make sure that When I close the file, the complete text from the file is gone , and I see the teminals' command/output that was previously present ?
I saw a lot of answers for this question already, and i tried the following things (but none of them is working) :
1) export TERM=xterm in .bashrc
2) altscreen on in .screenrc
3) set t_ti="" in .vimrc
I tried all these things, even tried without screen but none of them is working. Can anyone let me know how to solve this issue ? Also let me know if it is the settings in .vimrc or .screenrc or .bashrc which affect this behaviour and under what conditions (if we have these settings in all the 3 files which will take precedence) ? Any pointers to links/docs explaining this will be really useful.