Why does tmux clear the contents of the terminal when the editor exits?

Say I run tmux and use "ls" to get something on the screen. Then I go into Vim to edit some file. After exiting Vim, tmux erases any text above the bash prompt (not like the clear command, since the prompt stays in the same place).

Is there a way to prevent this behavior? I am using tmux 1.3 in Terminal.app on OS X.

+3
source share
2 answers

If your version tmuxhas this option, add this line to your ~/.tmux.conf:

set-window-option -g alternate-screen on
+5
source

Try putting this in your .vimrc file:

set t_ti= t_te=
0
source

Source: https://habr.com/ru/post/1777194/


All Articles