Larry Alkoff wrote:
Oh silly me. Now I understand.
After some experimenting I still have some questions.
1. I'd like to have _only_ the title (or path/title if I must) in the
titlebar and have the old title restored when I exit vim but I haven't
yet figured out how to do that after trying various combinations of
set title
set titleold
set titlestring or set titlestring ""
I keep getting the "flying" message.
2. Where or what are the defaults for 'title' 'titleold' 'titlestring'
and 'ttybuiltin' so I can have a "typical" title with the current
filename and (if applicable) the "servername".
The defaults are mentioned at the corresponding places in the help. They are
not set by any .vim scripts but by the C code of Vim itself. The "default"
value of an option is whatever it is set to if you _don't_ meddle with it.
That is, remove every ":set" statement for them in your vimrc (and gvimrc) and
you should get the following default values:
title " if Vim knows how to restore the title
notitle " otherwise
titleold=Thanks for flying Vim
" That's the default, but it shouldn't be used
titlestring= " having it empty means that Vim must construct
" a «typical» value
ttybuiltin " TRUE to use the builtin termcap if possible
If I have no entries at all for the above there is no "typical" title
with filename etc.
Hm...
1) What is the reply to (with question marks as shown)
:verbose set title? titleold? titlestring? ttybuiltin? term?
:echo has("gui_running")
2) What are the first four lines of the output of the ":version" command?
I've changed ~/.vimrc but not /etc/vim/vimrc but there is no 'title'
string in either of these as delivered so I'm confused as to the defaults.
Larry
[...]
You might try the following values.
THEY ARE GIVEN WITH ABSOLUTELY NO WARRANTY WHATSOEVER, INCLUDING, BUT NOT
LIMITED TO, MERCHANTABILITY OR FITNESS FOR ANY GENERAL OR PARTICULAR PURPOSE.
In particular, if they beat your dog, abduct your wife, put your house on fire
and reduce your computer to scrap metal, don't come weep in my jacket.
if !has("gui_running")
set titleold=
if &term == "xterm" && &t_ts == ""
let &t_ts = "\e]2;"
endif
if &t_ts != ""
set title titlestring=%t%m\ -\ VIM
endif
endif
Best regards,
Tony.