colorscheme highlights 88 color cterms

11 views
Skip to first unread message

richard emberson

unread,
Aug 24, 2012, 7:30:40 PM8/24/12
to vim_use
I note that some scheme when setting highlights for
cterms use numbers in the range 0 to 255.
What happens if one is using a rxvt 88 color terminal?
Does Vim automatically map all cterm numbers from the
0-255 space down to the 0-88 space when a 88 color
terminal is being used?
Are the colors for a 256 terminal simply mangled for
a 88 color terminal?
Should a highlight have instead of 'ctermfg'
but rather 'cterm88fg' and 'cterm256fg' entries?

Thanks
Richard

--
Quis custodiet ipsos custodes

Chris Jones

unread,
Aug 25, 2012, 11:32:31 AM8/25/12
to vim_use
On Fri, Aug 24, 2012 at 07:30:40PM EDT, richard emberson wrote:
> I note that some scheme when setting highlights for
> cterms use numbers in the range 0 to 255.
> What happens if one is using a rxvt 88 color terminal?

[..]

Save from referring to the code, you could check this as follows:

1. create a color.vim file with the following statements:

| syn match c000 "color000"
| syn match c001 "color001"
| syn match c002 "color002"
| ... etc.

2. create a color.vim color scheme with the following:

| hi c000 ctermfg=000 ctermbg=0
| hi c001 ctermfg=001 ctermbg=0
| hi c002 ctermfg=002 ctermbg=0
| ... etc.

3. create a color.txt file with the following:

| color000
| color001
| color002

Then while editing color.txt issue the following commands:

| :set syntax=color
| :color color

This should display each colorxx line in its assigned ctermfg=xx color

Not sure this will do what you request, but attaching test files to
illustrate.

CJ

--
AHH! The neurotic monkeys are after me!
color.vim
colorscheme.vim
color.txt
Reply all
Reply to author
Forward
0 new messages