Skip to content

Instantly share code, notes, and snippets.

@shime
Created September 10, 2013 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shime/6515781 to your computer and use it in GitHub Desktop.
Save shime/6515781 to your computer and use it in GitHub Desktop.
stop clearing screen when suspending from vim

I've been watching a lot of Gary Bernhardt's videos lately. I like how he constantly switches from Vim to terminal simply by using <C-z> to suspend Vim and $ fg to bring it back to the foreground.

The behavior of my local Vim was quite different, though. My screen was cleared every time I exit Vim. It was annoying. It was painful. I've finally stumbled upon solution:

" place this in your ~/.vimrc

set t_ti= t_te=

Read more about this unsearchable phenomenon here: http://www.shallowsky.com/linux/noaltscreen.html

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment