← til

Stop clearing screen when suspending from Vim

September 10, 2013
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!