amdt/vim-niji — pull request #7 by joshuarh (2013-06-11 02:57:25+00:00)
Title: Use helpers to get the desired colors

This allows someone who's adding support for a new colorscheme to use
logic when choosing which colors they want (like what's currently
happening with solarized), but avoids the problem of keeping all the
available colorschemes in memory.

This also reduces the need for guards, we only need one per variable,
because if the user hasn't specified which colors they want (or set the
boolean indicating they want the legacy colors) then we're free to
choose what we think is best for them based on what we know about their
colorscheme, possibly falling back to defaults if we don't know about
their colorscheme.

Note: I know the diff is quite noisy, but most of it was moving global variables into conditionals or adding the helpers. I've tested it with solarized and by using the `g:niji_dark_colours` example from the docs, both work

Note: I tried to get the indentation right, but let me know if I didn't! It might be good to add a modeline or something so it's uniform in the future :)