On 17/12/09 17:13, Charles Campbell wrote:
Dennis German wrote:
A. S. Budden wrote:

2009/12/17 Gabor Urban<[email protected]>:

I would like to play around with color schemes to create my own. I
have read some introductions I but would like to have someone in
contact, ...

There are many good examples in the help of course ... and there are a lot of 
good
examples in the scripts directory. ...
this list: we're always happy to help.

... my own 'alternative' syntax
...    
http://sites.google.com/site/abudden/contents/Vim-Scripts/bandit-colour-scheme
...
Using the CSApprox plugin makes the console version look a lot better....
Al

Al, thanks. The first part of bandit includes :  if exists("syntax_on")
| syntax reset | endif .
Does this mean that bandit does not use color/highlighting specific to
the programming language being edited?

Al, hope you don't mind my "butting in"...

Vim has language specific syntax recognition files.  These are typically
under  vim72/syntax/; they are not colorschemes.  They map lexical
constructs/syntax to highlighting group names.

Colorschemes map highlighting-group names (such as Statement, Number,
Special, ...) to specifications for actual colors.  They typically fall
under vim72/colors/ .

Now, the test you see checks if syntax highlighting is enabled, and if
its not, attempts to restore colorscheme highlighting defaults.

So the    if exists("syntax_on") ...    test has nothing to do with
"using color/highlighting specific to the programming language".

Regards,
Chip Campbell


However, most syntax scripts also define "default settings" for some or all of the highlight groups they define. These settings are usually links to the default groups, but not always. For instance, $VIMRUNTIME/syntax/html.vim includes

    if !exists("html_my_rendering")
      hi def htmlBold                term=bold cterm=bold gui=bold
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline hi def htmlUnderline term=underline cterm=underline gui=underline hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
      hi def htmlItalic              term=italic cterm=italic gui=italic
    endif

which can be regarded as "highlighting specific to the HTML language".

Examination of $VIMRUNTIME/syntax/syncolor.vim shows that it resets only the highlight groups which have a compiled-in default in Vim. Other groups, if linked to one of these, get default colours by virtue of their link, and if set to a definite value (like the ones above) keep their highlight.

Some colorschemes set values for only a restricted set of highlight groups, leaving the rest at their defaults. (The most extreme case of this behaviour is exhibited by $VIMRUNTIME/colors/default.vim). If you use ":syntax enable" when such a colorscheme is in use, both the defaulted highlight groups and those set by the colorscheme will be reset appropriately. (I know this isn't the object of the question.)


Best regards,
Tony.
--
Think of it!  With VLSI we can pack 100 ENIACs in 1 sq. cm.!

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

Reply via email to