I\'m new to tmux and am trying to figure out how to edit the configuration so that windows with vim open show up in the taskbar not as #:vim
but as whatever the
And to restore automatic window title on Vim exit:
autocmd VimLeave * call system("tmux setw automatic-rename")
I would also suggest to check if we are running under tmux:
if exists('$TMUX')
autocmd BufEnter * call system("tmux rename-window '" . expand("%:t") . "'")
autocmd VimLeave * call system("tmux setw automatic-rename")
endif