Wednesday, June 14, 2017

How does vim choose a color that is not in the terminals color palette?

I am using termite as my terminal emulator, which advertises 256 colors
support via terminfo. I only defined 20 colors: fg, fg_bold, bg, cursor
and the 16 colors in their normal and bright variants.
I do not use a vim colorscheme, just the terminal colors. In some shell
scripts I see colors that I have not defined and which are not affected
if I change my color palette. So my question is: How are those colors
determined and how can I change them?

How to reproduce:
1) set t_Co=256 in vimrc (if it is set to 16 those "new" colors do not
appear)
2) I set all 16 colors in my termite config file to #ff0000 (to
oberserve the changes)
3) Minimal shell script:
#/bin/bash
$testvar=1
cd dir
./command --help
4) $testvar is in cyan, --help is in some pinkish color

I haven't tested setting all 256 colors in my config file to red, if
this affects those two cases I found.

Kind regards

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