Problem with color scheme in vim (terminal version)

468 views
Skip to first unread message

Kristoffer Stensbo-Smidt

unread,
Nov 9, 2007, 8:58:30 AM11/9/07
to v...@vim.org
I have just made a full install of vim 7.0 and gvim using the package manager in Debian. My problem is that the syntax highlighting works very badly in the terminal version of vim – if it works at all.
When I try ':colo desert' it changes only the color of the text (but not even to the correct colors) and not the background. When I try ':colo chela_light' nothing happens at all. Both of these color schemes work perfectly in gvim. Any ideas on how to get this working in the terminal?

Best regards,
Kristoffer Stensbo-Smidt

Tony Mechelynck

unread,
Nov 9, 2007, 9:30:38 AM11/9/07
to vim...@googlegroups.com, v...@vim.org

Are you using default terminal colors (light grey on black) or are you using
some "xterm color scheme" outside of Vim? If you are, Vim is not necessarily
aware of it.

What happens if you log in on a text console (Ctrl-Alt-F2 then repli to the
login prompt with username & password) and start Vim there? Can you set
colorschemes properly?

Use ":view $VIM/vimfiles/colors/chela_light_vim" or ":view
~/.vim/colors/chela_light.vim" (depending on where that color scheme is
located -- it should NOT be under $VIMRUNTIME because it wasn't distributed
with Vim and any upgrade can silently change or remove anything in the
$VIMRUNTIME tree). Does it include "cterm/ctermfg/ctermbg" clauses in its
":hi" statements? If not, it's a GUI-only colorscheme.

Similarly with ":view $VIMRUNTIME/colors/desert".

The settings for console Vim in a color terminal (cterm= ctermbg= ctermfg= )
are not necessarily the same as for gvim (gui= guibg= guifg= ) because a color
terminal typically has 8 background and 16 foreground colors, whereas the GUI
typically has 16,777,216 of each kind.


Best regards,
Tony.
--
"The identical is equal to itself, since it is different."
-- Franco Spisani

Kristoffer Stensbo-Smidt

unread,
Nov 9, 2007, 10:52:08 AM11/9/07
to vim...@googlegroups.com, v...@vim.org
You hit the bull's eye - chela_light contains only gui/guibg/guifg whereas desert contains cterm/ctermfg/ctermbg, but also some gui/guibg/guifg which explains the different look in the terminal and gvim. Now it makes sense! Thanks!

Best regards,
Kristoffer

2007/11/9, Tony Mechelynck <antoine.m...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages