Albie Janse van Rensburg wrote:
A.J.Mechelynck wrote:
Albie Janse van Rensburg wrote:
Eric Leenman wrote:
Hi,
I'm doing a reinstall of gvim and placing my color and font setting
in a seperate file in the plugin.
This file is located in: "C:\Program Files\Vim\vimfiles\plugin"
And it contains the following:
[START OF FILE]
:hi Comment ctermfg=darkgreen gui=None guifg=darkgreen
:hi Statement ctermfg=blue gui=None guifg=blue
:hi Identifier ctermfg=darkred gui=None guifg=darkred
:hi PreProc ctermfg=blue gui=None guifg=darkblue
:hi Type ctermfg=darkgray gui=None guifg=darkgray
:hi Constant ctermfg=red gui=None guifg=red
" GUI font instellingen
set guifont=courier:h7:w7
[END OF FILE]
What now happens is that the font is taken over but the colors aren't
For example:
When I type :hi Comment
vim returns:
Comment xxx term=bold ctermfg=1 guifg=Blue
What do I do wrong?
Regards,
Eric
_________________________________________________________________
Check out all that glitters with the MSN Entertainment Guide to the
Academy Awards®
http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2
Colour files should go into the vimfiles/colors directory,
Yes.
and needs to be named according to the filetype you want it to be
used for. For instance, sql.vim will be loaded for .sql files.
No (see below).
You can further specify what filetype to use for a file by creating a
filetypes.vim file in the vimfiles/ftdetect directory.
... a filetype.vim file in a directory in 'runtimepath', *and/or* one
or more Vim script(s) of _any_ name in the ftdetect subdirectory of a
directory in 'runtimepath'.
For more info about this, see
:help ftdetect
Also,
:help syntax
and also (more important)
:help :colorscheme
Hope that helps
The files in the colors directory are what is called color schemes in
Vim parlance, and correspond to what would be called "themes" or
"skins" in other programs. Their names bear *no relation* to the files
to be edited with them. Vim never loads them automatically but only as
a result of the ":colorscheme <name>" command, which is roughly
equivalent to ":runtime colors/<name>.vim" where <name>.vim is the
name of an arbitrary colorscheme script.
The highlight groups to use for files of a given syntax are in the
syntax subdirectory of directories in 'runtimepath', and they may
define default colors for highlight groups not predefined in Vim, by
using ":highlight default" commands (see ":help :highlight-default").
Absolutely. I had my syntax file and colorschemes info mixed up. I
hope the OP reads your corrections. _Syntax_ files need to be named
according to their application (language), whereas colorscheme files are
used to change the colours of text _according_to_the_syntax_ file
definition. The colorscheme effectively is applied over the syntax
definition.
Indeed. This also means that ":syntax on" reloads the current colorscheme (if
any, or sets the default colours if none), which may explain why Eric didn't
see his colour highlights.
Note that since many syntax scripts define their color highlight groups by
"linking" them to the default groups, setting highlights for said default
groups will usually go a long way towards colouring everything. (For instance,
by default the colours of the "Comment" group are reused for cComment,
htmlComment, vimComment, etc., so unless you want to use different colours for
each of these -- which IMHO would be rather pointless -- you can content
yourself with defining Comment highlights and the various <something>Comment
groups will all be set to that.)
":help :colorscheme" indeed.
The OP is talking about a colorscheme file though (the first part,
defining highlight groups), which should be placed in vimfiles/colors.
As for the guifont setting, I personally do it in my vimrc file, but
afaik it should work in a colorscheme file as well.
From what I can see, the highlight settings are loaded into a
colorscheme (which will have the name of the .vim file containing them),
so by running
:colorscheme <filename>
your highlight groups will get set, Eric. First move your file into the
vimfiles/colors directory to avoid unpredictable results.
Best regards,
Tony.
--
The USA is so enormous, and so numerous are its schools, colleges and
religious seminaries, many devoted to special religious beliefs ranging
from the unorthodox to the dotty, that we can hardly wonder at its
yielding a more bounteous harvest of gobbledygook than the rest of the
world put together.
-- Sir Peter Medawar