I have a pretty nice screen rc file that shows me the open screen windows almost like tabs at the bottom of the terminal. Currently the windows are named according to my prompt which is not so useful. Is there a way to automatically name the windows based on the filename of an open vim session currently in the window? I think this would make a supreme multi window editor if it were possible.
if &term == "screen" set t_ts="\ek" set t_fs="\e\\" set title endif
I did itusing a bit of a hackier way: Using tcsh I put the following in my .cshrc
# escape sequence to set the screen title alias stitle 'echo -n "^[k\!*^[\\"' # shorthand to set the screen title to the hostname alias H stitle `hostname -s` # shorthand to set the screen title to the filename, launch vim, and then set it back alias vis 'stitle \!* ; vim \!* ; H'
So long as you remember to use vis instead of vim when you want the title there it works.
I also added
to my .vimrc to keep vim from setting the title of the window screen was running in.