Monday, May 22, 2017

fully disable xterm title?

Hi,

I want to fully disable vim's xterm title bar manipulation. Web searches offer ten thousand advices on how to turn it *on*, but very little on turning it off. sigh.

Using --

$ script -c 'vim foobar' /tmp/junk

-- I can see that even with "set notitle" in my .vimrc, vim still sets the title to "foobar", then sets it back to the original string. For instance, these strings appear in the output of `vim -u NONE foobar`, with "set notitle; set t_ts=" in .vimrc:

\033]2;foobar (~) - VIM\007
\033]1;foobar\007
\033]2;old_title\007
\033]1;old_title\007

None of the following attempts were sufficient to stop it from doing that:

"set notitle" in .vimrc
"set t_ts=" in .vimrc
$ vim -u NONE
$ vim --cmd "set notitle"
$ vim -C # not even 'compatible mode' does it

These DO prevent it, but have additional effects -- I don't want to totally disengage vim's X11 capabilities, only the title manipulation:

$ vim -X
$ DISPLAY= vim

I could create a special terminfo entry with no title manipulation facilities for vim's use only, but .... ughhhhh.

vim 7.4 "Included patches: 1-1689" "Extra patches: 8.0.0056", on Ubuntu 16.04.02 x86_64. [Future patch 7.4.2264 says "Improve handling of the title.", but code does not look like it would affect my issue; did not try to build with it.]

Thanks,

>Bela<

PS: SOLVED! But I think worth injecting where other people may eventually find it as a solution to the same or related issues.

I was being misled: the '\033]1' sequence has to do with the *icon* of an xterm (what the window manager would show if it were minimized). I think in some cases I had gotten it down to only showing that sequence in the output; which means I had already fixed my problem, but followed a false indicator that it wasn't fixed.

After downloading the source, I noticed the Makefile creating something called "no_title.vim"; this included the command "set noicon".

Putting:

set notitle noicon

into my .vimrc *is* sufficient to fully prevent title manipulations, including those icon manipulation sequences which I was falsely identifying (but which, truthfully, I also don't want).

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment