Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

everytime I use vim, it leaves the output of the last file in the terminal. This didn't use to happen before. It used to clean up all the buffer. for example, the current behavior is

/Users/snihalani at 12:29PM ➜ vim temp

1

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
temp

/Users/snihalani at 12:29PM ➜`

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The behaviour of restoring the old text content (old screen) is called alternate screen.

In vim you can change this feature by adding the relevant lines to your .vimrc:
Which would be something like set t_ti= t_te=

You can also set it in a non-program specific (general) way by editing your terminfo and by setting the right terminal type. I do not have any experience with this, but this page seems to have clear descriptions. And with the term alternate screen known it is easy to google for more information. An alternative to search for is smcup/rmcup

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.