Setting &titleold does not work

40 views
Skip to first unread message

Ryan

unread,
May 14, 2013, 6:48:26 PM5/14/13
to vim...@googlegroups.com
Hi,

I've tried to set the title as shown in the docs:

set title
let &titlestring = "titlestring"
let &titleold = "titleold"

The title string works just fine. But, the title old does not appear to work. I am using xterm in

Yakuake
Version 2.9.6
KDE Dev Platform 4.4.5

The title after a quit is "Yakuake".

I moved my .vim dir and .vimrc file to .bkp_vim and .bkp_vimrc to make sure there were no scripts or plugins doing this. It appears this is vim doing it.

Ryan

Jürgen Krämer

unread,
May 15, 2013, 4:07:06 AM5/15/13
to vim...@googlegroups.com

Hi,

Ryan wrote:
>
> I've tried to set the title as shown in the docs:
>
> set title
> let &titlestring = "titlestring"
> let &titleold = "titleold"
>
> The title string works just fine. But, the title old does not appear to work. I am using xterm in
>
> Yakuake
> Version 2.9.6
> KDE Dev Platform 4.4.5
>
> The title after a quit is "Yakuake".

to me this seems to be correct. ":help 'titleold'" says that this option
is *only* used "if the original title cannot be restored".

Regards,
J�rgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

Paul

unread,
May 15, 2013, 12:35:06 PM5/15/13
to vim...@googlegroups.com
On Tuesday, 14 May, 2013 at 23:48:26 BST, Ryan wrote:
>I've tried to set the title as shown in the docs:
>
>set title
>let &titlestring = "titlestring"
>let &titleold = "titleold"

Shouldn't you be setting it instead of letting it?

Gary Johnson

unread,
May 15, 2013, 12:41:28 PM5/15/13
to vim...@googlegroups.com
"let &name" is the same as "set name". See

:help :let-&

Regards,
Gary

Ryan

unread,
May 15, 2013, 9:38:57 PM5/15/13
to vim...@googlegroups.com, jott...@googlemail.com
On Wednesday, May 15, 2013 8:07:06 PM UTC+12, Jürgen Krämer wrote:
> Hi,
>
>
>
> Ryan wrote:
>
> >
>
> > I've tried to set the title as shown in the docs:
>
> >
>
> > set title
>
> > let &titlestring = "titlestring"
>
> > let &titleold = "titleold"
>
> >
>
> > The title string works just fine. But, the title old does not appear to work. I am using xterm in
>
> >
>
> > Yakuake
>
> > Version 2.9.6
>
> > KDE Dev Platform 4.4.5
>
> >
>
> > The title after a quit is "Yakuake".
>
>
>
> to me this seems to be correct. ":help 'titleold'" says that this option
>
> is *only* used "if the original title cannot be restored".
>
>
>
> Regards,
>
> J�rgen
>
>
>
> --
>
> Sometimes I think the surest sign that intelligent life exists elsewhere
>
> in the universe is that none of it has tried to contact us. (Calvin)

That's not the original title as set by me in my precmd and jobcmd alias. So, I would say technically that it is not.

I found a hack around on the net:

set title " show title in title bar
let &titlestring = v:progname . " - " . " [" . $FILM . " " . $SCENE . " " . $SHOT . "]"
auto BufEnter * let &titlestring = v:progname . " - " . expand("%:p") . " [" . $FILM . " " . $SCENE . " " . $SHOT . "]"
function! ResetTitle()
" disable vim's ability to set the title and let the precmd do it
exec "set title t_ts='' t_fs=''"
endfunction
autocmd VimLeave * silent call ResetTitle()

Of course when vim job is suspended this does not work. I need to investigate whether there is an autocommand for that case as well.





Paul

unread,
May 16, 2013, 6:30:01 AM5/16/13
to vim...@googlegroups.com
On Thursday, 16 May, 2013 at 02:38:57 BST, Ryan wrote:
>> > The title string works just fine. But, the title old does not appear to work. I am using xterm in
>> >
>> > Yakuake
>> > Version 2.9.6
>> > KDE Dev Platform 4.4.5
>> >
>> > The title after a quit is "Yakuake".
>>
>> to me this seems to be correct. ":help 'titleold'" says that this option
>> is *only* used "if the original title cannot be restored".

I see something similar with konsole. I have it set to "Window title as set by shell (%w)", but when exiting vim, the title gets set to the name of the konsole profile instead of the output produced by PROMPT_COMMAND. I think it's a bug in konsole, because PROMPT_COMMAND is being run, and I don't see this in other terminals, including xterm.
Reply all
Reply to author
Forward
0 new messages