cga2000 wrote:
On Sun, Oct 01, 2006 at 08:34:50AM EDT, A.J.Mechelynck wrote:
[...]
After making changes to your current colorscheme, ":syntax on" will
reapply it.

This would reload the original colorscheme .. doing a "reset defaults"
or rather original color scheme, if there is one .. so-to-speak ..
right?

No, because the variable colors_name remembers the name of your colorscheme, and ":syntax on" uses that variable to load the correct colorscheme.


I don't suppose there's any way I can save the current interactively-
modified colorscheme to a file?  What I mean is that .. I use a given
colorscheme and make changes to it in a Vim session .. say, I want the
cusor to be easier to see :-) .. or I don't like the reverse-vid effect
that hilights searched/found items .. etc.

You can edit your current colorscheme script, save it, ":syntax on" and presto! see your new colors. Dr. Chip (aka Charles E. Campbell Jr., PhD) has also written a colorscheme editor which is uploaded at vim-online and/or on his site. It's called hicolors.vim and I have it but I don't use it because it has nasty habits (such as using :map without <buffer> on {lhs}es like ? [interfering with backward search] and <LeftMouse> and <RightMouse> [interfering with other mouse actions]).


So I play with all this stuff for 10 minutes until I like what I see.
And when I'm done with my changes, I want to save them somewhere .. Now,
I still need to copy the original colorscheme under a different name and
edit it manually to implement my changes one at a time, am I correct?

You shouldn't edit-in-place something that resides in $VIMRUNTIME somewhere; but if the colorscheme is your own, you can edit it at will; and even use u (undo) to rollback the edits done before the latest save in the current Vim session.


The way I do this is to split the screen .. so I have the colorscheme in
one half and my sample practice file in the other .. So, I use the <UP>
cursor key to retrieve my ":hi" commands .. gnu/screen to copy/paste
them in the colorscheme in lieu or the original statements .. and save
my changes to colorscheme_custom .. eg.
Rather messy but safe .. As long as I can figure out which among the
dozens of commands I issued were the "final" ones for a particular :hi
feature, that is ..

        :hi SomeGroupName

will tell you which color settings are currently set for highlight group SomeGroupName (and :hi _without_ any arguments gives you the colors for _all_ groups).


I wasn't too sure where I could look for this (keywords?) .. but I didn't
find anything like this either in the tips/scripts or in the help files.

Thanks

cga


I suppose it's explained under ":help :highlight" and below more than anywhere else (sections 12 and 13 of syntax.txt -- it's rather lengthy); but it's mainly something you have to "learn by doing".


Best regards,
Tony.

Reply via email to