On Wed, Aug 30, 2017 at 01:59:28PM +0200, Christian Brabandt wrote:
> On Mi, 30 Aug 2017, Bram Moolenaar wrote:
> > I'm getting tired of those terminals that say they are xterm while they
> > are not...
> 
> Understood. I still have this condition in my .vimrc:
> 
> https://github.com/chrisbra/vim_dotfiles/blob/master/vimrc#L219-L222
> 
> " gnome terminal sucks
> if (exists("$COLORTERM") && $COLORTERM is# 'gnome-terminal')
>   set term=builtin_ansi
>   set t_Co=256
>   colorscheme molokai
> endif
> 
> This is obviously only a workaround and I don't remember why I initially 
> wrote this. This has been in one of my vimrcs for much longer than the 
> git blame output would state. But I don't know what problem this 
> initially worked around.

Note that this does nothing today since gnome-terminal stopped setting
$COLORTERM in 2014 (and then began setting COLORTERM=truecolor in 2016).

It also switched from using "xterm" as default $TERM value to
"xterm-256color", but you can override that with a ./configure
argument.  I don't know if any distros do that; I'm pretty sure Ubuntu
doesn't.

Incidentally, libvte exports $VTE_VERSION, which could be used to detect
if you're running inside gnome-terminal or any other VTE-using terminal,
as long as you don't mind this detection breaking when sudo or ssh
strips the environment or when you run a screen/tmux, which intercepts
and interprets all the escape sequences.

Marius Gedminas
-- 
I doubt, therefore I might be.

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: PGP signature

Raspunde prin e-mail lui