1

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

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

1 Answer 1

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).

2
  • 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, 2012 at 17:46
  • Because it relies on ANSI escape sequences, this setting should work on all curses-based terminals, I think. Dec 7, 2012 at 17:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .