On Thursday, April 12, 2012 5:49:05 AM UTC-5, Tarlika Elisabeth Schmitz wrote:
> Can someone confirm that this is the right procedure:
> 
> If I want to make amendments to a colour scheme colours.vim (for
> instance amend or add highlight groups) I do so
> in .vim/after/colors/colours.vim. 
> I have installed the AfterColors plugin and this works fine.
> 
> 
> However, if you have colour scheme that uses script-variables (s:var)
> to determine colours based on global settings in .vimrc, this system
> falls down because you can't access the variables in the after/colors
> script.
> 
> It's obviously not ideal if you are forced to make your
> personal amendments in the original .vim/colors/colours.vim because
> you'll lose the changes with the next upgrade.
> 
> I presume the best solution would be to use global variables in the
> colour scheme file?
> 
> -- 
> 
> Best Regards,
> Tarlika Elisabeth Schmitz, Scotland

I normally edit the colorscheme file directly, but do so only by adding text to 
the end of the file, rather than editing existing lines. If I need to override 
just the foreground color, I can still do that. For example, these end up with 
the same highlighting:

hi Comment guifg=blue guibg=black gui=underline
"custom additions
hi Comment guifg=yellow

vs.

"modified inline
hi Comment guifg=yellow guibg=black gui=underline

Going with the former, on an upgrade, you can simply copy/paste your additions 
and tweaks rather than trying to merge anything in a difficult fashion.

I've found that colorscheme files are updated rarely anyway, and honestly once 
I get it tweaked to my tastes I'm rarely interested in upstream updates.

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

Reply via email to