I use cscope+ctags+vim to browse/edit my source code. I have put set title in my .vimrc to display the filename I am currently editing/reading in the window title bar. This works perfectly in bash. However when I open vim from tmux, the window title bar doesn't not changes. How to fix this?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With