Monday, April 30, 2012

Re: good 256 color theme for C

On 30/04/12 10:23, sinbad wrote:
> I just started using tmux, and i am exploring 256 color option of
> the terminal. Is there any good colorscheme that uses theses colors
> effectively, especially for C programming ?
>
> cheers
>


For Vim to use 256 colours effectively, you have to make sure that t_Co
gets set to 256 when running in a 256-colour terminal, but not when in a
terminal with fewer colours (such as the Linux hardware-text console or,
I think, the Windows console, at least when in fullscreen mode).

Previous posts in this thread provide several answers to that; mine (not
necessarily the best) is simply

" use 256 colors in Console mode if we think the terminal supports it
if &term =~? 'mlterm\|xterm'
set t_Co=256
endif

Then you need a colorscheme which makes use of them. If you are using a
GUI-enabled Vim in console mode (which is possible on Linux but not on
Windows), you can use the CSApprox plugin, which will "translate" the
24-bit (16 million colors) gui= guibg= guifg= guisp= of any GUI-oriented
colorscheme into something as near as possible to the same colours on a
256- or 88-color terminal. (On a terminal with fewer colours, such as 8
bg + 16 fg, it will simply desist and let the cterm= ctermbg= ctermfg=
colours remain in force.) This way, if your terminal has 88 or more
colours, you'll get approximately the same look and feel as in gvim. I
like it but of course YMMV.

See also http://vim.wikia.com/wiki/Using_GUI_color_settings_in_a_terminal


Best regards,
Tony.
--
GALAHAD: No. Look, I can tackle this lot single-handed!
GIRLS: Yes, yes, let him Tackle us single-handed!
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

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

No comments:

Post a Comment