cga2000 wrote:
On Fri, Aug 04, 2006 at 09:12:46AM EDT, Mikolaj Machowski wrote:
Hello,

Since Konsole in KDE 3.5.4 supports 256 colors it could be nice if
Vim could use them. Is any way to convince Vim to use guibg/guifg from
syntax files in console?

If I understand correctly one problem is to map the 256 available
colors to the 64K or 16M colors available in the gui.

So just changing the keywords in the color scheme is not enough.

Thanks

cga



I notice that in vim (7.0.42, Huge version with GTK2-GNOME GUI) run in console mode in "Konsole 1.5 (Using kde 3.4.0 Level "b" SUSE 9.3)", 'term' and $TERM are set to xterm, t_Co is set to 8, which means that Vim believes that only 8 colors are available. ":runtime syntax/colortest.vim" shows, however, 8 background colours but 16 foreground colours.

Under ":help xfree-xterm" there is (28 lines lower) a paragraph starting "For 256 colors this has been reported to work:". Have you tried that? (You would of course have to set t_Co to 256 and make sure that your particular version of konsole can really display 256 different colours at the same time.)

I suppose that in these settings, <Esc> is actually one character, not five (hit Ctrl-V followed by Esc, it should appear as ^[ in the typed text).

Then you would have to use ctermfg= ctermbg= with *numbers* between 0 and 255 inclusive. You might want to make a test file to highlight itself with all those colours, just as syntax/colortest.vim does with the 16 usual RGBI colours. You might also want to set X resources for all of Xterm*color0 to Xterm*color255 as shown (for 16 colors) at the above-mentioned place in the help. These X resources will then (if your konsole uses them) establish the mapping from the 256 numbers 0-255 to 256 of the 16M (2^12) colors theoretically mappable in the #xxxxxx notation (where each x is a hex digit).


Best regards,
Tony.

Reply via email to