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.

I am using vim within a terminal. Whenever I close vim (using :q), the windows stay in the buffer of the terminal. I can type commands, but I still see the text that I was editing. I don't know how to get rid of this behaviour.

Does anybody know what I can do to change this behaviour ? In my .vimrc / terminal configuration ?

Thanks in advance

share|improve this question

migrated from stackoverflow.com Dec 7 '12 at 8:32

This question came from our site for professional and enthusiast programmers.

5  
What are you using for the terminal? –  qqx Dec 6 '12 at 21:06
    
how about a ctrl+l after you quit? –  darryn.ten Dec 7 '12 at 10:05
    
I am using Terminal on mac os. –  Raphael Pr Dec 7 '12 at 17:46

1 Answer 1

First of all, the 'restorescreen' option must be set (it is by default, but something might have turned it off).

:verbose set restorescreen?

will tell you. What kind of escape sequences must be sent (and whether they are understood by your terminal, whose name you unfortunately didn't mention), depends on your terminal. Check out :help 'restorescreen' for hints (and maybe try with another terminal emulator).

share|improve this answer
    
Unfortunatly this solution seems to work on Windows 95/NT version. I am using Terminal on Mac OS. Thanks for your help anyway. –  Raphael Pr Dec 7 '12 at 17:46
    
Because it relies on ANSI escape sequences, this setting should work on all curses-based terminals, I think. –  Ingo Karkat Dec 7 '12 at 17:52

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.