Monday, August 28, 2017

Re: how to set background color for vim terminal

On 10:24 Mon 28 Aug , Lifepillar wrote:
> On 28/08/2017 00:13, Bram Moolenaar wrote:
> >
> > Marcin Szamotulski wrote:
> >
> >> I was looking how to set up background color for the `:termainal` (on
> >> linux). I cannot find proper documentation on how to adjust libvterm.
> >
> > The program you run in the terminal can change the background.
> > Otherwise the same background as Vim is used.
> >
> > Note that on Mac it appears to be impossible to set the background color
> > to white. That's a problem with Terminal.app.
>
> In both Terminal.app and iTerm2 with notermguicolors, the terminal
> background is set to Vim's background, as you say. Not all of the 256
> colors look right, though. Attached you find a screenshot: the
> colorscheme is Solarized 8, although the particular colorscheme should
> not matter. See how a few of the 256 colors are out of place, and also
> a shade of gray is wrong. Of the system colors, Normal White (color 7)
> and Bright Black (color 8) are grey instead of Solarized white
> (#EEE8D5) and Solarized black (#333344), respectively. Note that this
> is what I see also in iTerm2, so this does not appear to be
> a terminal-specific problem (or, both terminals have the same issue).
>
> In iTerm2 with termguicolors, the terminal does not seem to inherit
> the colorscheme's colors, but it appears to always use default colors
> (the 256 color palette looks right in this case). In particular, the
> background is always white or black, depending on the value of
> 'background' at the moment the terminal is started. See the other two
> attachments. This is also what I see in MacVim.
>
> Finally, I have tried NeoVim's terminal for comparison, and colors
> appear to look right under all circumstances. So, it is definitely not
> "impossible" to correctly set all the 16 system colors (but, maybe,
> NeoVim is doing something hackish?).
>
> Life.
>
> --
> --
> 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.

I am on Linux though. And I can set background background through bash or
zsh escape sequences but that's not very reliable. When using ls or man
it will break in one way or the other (ls will often show patches of the
original background color, man will just use the default terminal
background color). When running an xterm I just use the `-bg` flag
which works perfectly fine (or just set up things in .Xresources file).
Is there a such a way with libvterm?

I see very similar behaviour that Lifepillar has. The background is
white or black rather than what is in `:hi Normal`.

Best regards,
Marcin

--
--
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: