On 2021-02-18, lacygoill wrote:

> Or maybe we need some new sequence to query the name of the outer
> terminal from tmux...

You can prefix the normal escape sequence with <Esc>Ptmux;<Esc> to
go though tmux to the outer terminal.  I still have this in my vimrc
from some earlier experiments:

    " Released in tmux v1.5 (2011-07-09):
    "
    "   Support passing through escape sequences to the underlying
    "   terminal by using DCS with a "tmux;" prefix.
    "
    "   Note that this must be set _after_ any setting of 'term'
    "   because setting 'term' also sets dependent termcap
    "   variables including 't_RV'.
    "
    if exists("$TMUX")
        let &t_RV = "\ePtmux;\e\e[>c\e\\"
    endif

The problem with it is that TMUX is not normally exported by an ssh
server, but if that's not a problem for the OP, then this technique
should work for t_RB as well.

I didn't like that Vim wouldn't know the terminal type until after
vimrc had been processed, so I added the termresponse query to my
.bashrc and set a TERMRESPONSE environment variable to the response.
My vimrc then uses $TERMRESPONSE to make various terminal-dependent
settings.

Regards,
Gary

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20210219025401.GB10301%40phoenix.

Raspunde prin e-mail lui