Wednesday, March 31, 2010

Re: .vimrc colors ; highlight xxxxxx ctermfg=cccccc what xxxxxx and cccccc are OK?

On 31/03/10 03:27, dgerman wrote:
> I am running on a shared host
>
> $TERM=xterm-color
> vim version 7.0.237
> i686-redhat-linux-gnu
>
> I have added to my .vimrc file:
>
> highlight comment ctermfg=darkgray
> highlight constant ctermfg=darkblue
> highlight Identifier ctermfg=black " html< and />
> highlight search ctermbg=lightYellow ctermfg=black
> highlight Special ctermfg=Gray
> highlight Statment ctermfg=red ctermbg=yellow
> highlight Function ctermfg=darkGray " begin tag wickets , =
> highlight Type ctermfg=Darkgray
> highlight Question ctermfg=red ctermbg=blue
> highlight NonText ctermfg=darkGray
> highlight PreProc ctermfg=darkGray
> highlight htmlTitle ctermfg=DarkGray
>
>
> The entire .vimrc is at http://www.Real-World-Systems.com/docs/vimrc
>
>
> when editing an .html file
>
> text is in black, that's good
> wickets (< and> ) are in black, that's ok
> HTML tag names are in yellow (?) that's good
> broken tag , (second< in a row ) is gray/red that's good
>
> &amp; etc are shown in gray. that's Not Nice
>
> keywords before = are blackBold
> values after = are blue, that's ok
>
> h3 is in violet(?)
>
>
> 1) what colornames are permitted, ( orange is not )
>
> 2) where is the list of keywords?
>
>
>
> Thanks in advance
>

IIUC, for xxxxxx (the highlight group name) almost any keyword is
_permitted_, but a name is only useful if it is _used_ somewhere.

- Some groups are predefined by Vim:
:help hl-<Ctrl-D>
- Some others, even without a help entry, are defined by :syntax on:
:view $VIMRUNTIME/syntax/syncolor.vim
- Some more are defined by the various syntax scripts, usually (but not
always: see for instance htmlBold, htmlItalic, etc.) by linking to one
of Vim's default groups:
:view $VIMRUNTIME/syntax/vim.vim
:view $VIMRUNTIME/syntax/c.vim
:view $VIMRUNTIME/syntax/html.vim
:view $VIMRUNTIME/syntax/sh.vim
:view $VIMRUNTIME/syntax/dosbatch.vim
:view $VIMRUNTIME/syntax/perl.vim
:view $VIMRUNTIME/syntax/python.vim
etc. etc. etc.
- You may use any existing name (including a new one that you define
yourself) for matching:
:help :match
:help :2match
:help :3match
:help matchadd()
:help matchdelete()


For cccc, the color name, some names are permitted for ctermbg=
ctermfg=; the same, plus many more, are permitted for guibg= guifg=

First, in the console: see
:help cterm-colors.
Numbers from 0 to one less than 't_Co' are permitted (but they don't
mean the same everywhere: for instance 1 means red on the Linux console,
but blue on the Dos console), and also the names listed in that help topic.

For the GUI, the list can be obtained by looking at the file rgb.txt. On
Unix/Linux, you probably already have one but its location varies from
one distro to the next, you may have to search. On Windows, you may or
may not have one in $VIMRUNTIME for use by gvim. On Windows, OS-defined
names are also permitted, see
:help gui-colors
:help win32-colors
:help dos-colors
In addition, in the GUI, colors can be defined as #xxxxxx where xxxxxx
are six hex digits (no more, no less): two for the red component, then
two for the green component, then two for the blue component.
"Abbreviated" values with only three hex digits, as used in HTML and
CSS, are not accepted by Vim.


Best regards,
Tony.
--
Nihilism should commence with oneself.

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

To unsubscribe, reply using "remove me" as the subject.

No comments:

Post a Comment