Tuesday, November 25, 2014

Re: tmux and screen restore

On 2014-11-25, surge wrote:
> Hi,
>
> If this has been answered, I'm sorry. Please point me to the right
> post -- I couldn't find much.
>
> I'm using tmux through ssh and the screen is not restored upon
> exiting from vim. No matter what the terminal type and even with
> these commands in .vimrc:
>
> if &term =~ "linux"
> let &t_ti = "\<Esc>[?47h"
> let &t_te = "\<Esc>[?47l"
> endif
>
> Any ideas?

Are you sure &term matches "linux"? "linux" is the value of TERM
set by a Linux console. Most terminals set TERM to "xterm". Tmux
sets TERM to "screen". (Vim sets &term to $TERM if TERM is set.)

You might try setting &t_ti and &t_te unconditionally and see if
that helps.

That said, I'm surprised that this doesn't "just work" for you. I
am currently running vim in a tmux window over ssh. The local
terminal is GNOME Terminal 2.32.0. The values of 't_te' and 't_ti'
automatically set by vim are:

t_te=^[[?1049l
t_ti=^[[?1049h

What is your remote operating system? What terminal are you running
locally? Before you override them, what does vim say the values of
'term', 't_te' and 't_ti' are?

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: