On 10/07/09 11:13, [email protected] wrote:
>
>> To change the highlighting of the current line, I have this
>> in my .vimrc:
>>    hi CursorLine guisp=NONE   gui=NONE      guifg=NONE guibg=darkgrey
>> ctermfg=NONE   ctermbg=darkgrey term=NONE cterm=NONE
>>
>> My problem is, that darkgrey is not dark enough for me!
>> I tried doing something like this:
>> ... ctermbg=#0f0f0f ...
>> but vim does not accept that (E421: Color name or number not
>> recognized:
>> ctermbg=#000f00 term=NONE cterm=NONE)
>>
>> What can I do?
>> Thanks!
>> Nathan
>
> You could try defining your own colour in rgb.txt (:help rgb.txt),
> for example, I use this:
>
>    0   96 255         BobBlue
>
> Then in my colour scheme definition I use it in the normal way like this:
>
> hi SpecialKey guifg=BobBlue ctermbg=DarkBlue ctermfg=White
>
> However, there are two problems with this approach, perhaps others can help or
> provide a better solution?
>
> 1) rgb.txt apparently has to be in $VIMRUNTIME and not vimfiles\, so can get 
> lost
> when you upgrade.  I couldn't find a better place to define the colour. (The 
> help
> suggests defining its location using rgb_file for FVWM configuration
> files (:helpgrep rgb_file).  I haven't looked into it in great detail.)
>
> 2) As you can see some colours don't work in some terminals, my colour
> doesn't work in XP cmd.exe terminal vim.  I suppose ymmv depending on which
> terminal you're using, and whether it can handle your particular colour.
>
> regards,
> Geoff

rgb.txt has to be in $VIMRUNTIME for _Windows_ gvim. Unix gvim can IIUC 
use the rgb.txt installed by your Unix/Linux distribution in some X11 
directory.

But even so, rgb.txt, like the hexadecimal #RRGGBB colour values, 
applies only to the GUI. In Console Vim, there is a plugin for 
256-colour cterm, which IIUC can compute the "nearest" cterm colour from 
your GUI setting, see Matt Wozniski's post in the parallel thread. If 
your cterm has fewer colours than that, I don't think it can display 
gray hues other than blak, darkgray, lightgray and white, so if you want 
something else as a bg in an 8/16 colour term I suppose you should use 
darkred, darkblue, darkgreen or brown.


Best regards,
Tony.
-- 
hundred-and-one symptoms of being an internet addict:
68. Your cat always puts viruses on your dogs homepage

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to