The issue was because $TERM
in bash
is xterm
whereas inside tmux
$TERM
is screen
. I updated my .vimrc
to select the correct term.
if &term == "screen"
set t_ts=^[k
set t_fs=^[\
endif
if &term == "screen" || &term == "xterm"
set title
endif
To get the escape sequence ^[
in vim, press Ctrl-V then Esc.