godlygeek/csapprox — pull request #7 by bukzor (2012-01-23 21:26:47+00:00)
Title: More accurate and minimal snapshots.

I'd really benefit from a critique of this changeset.

In particular, the colors 'fg' and 'bg' were being used too often, which was preventing some reverse and background-only color groups from functioning as intended.

I went on to do a fairly major refactor which allows me to output a more minimal and readable snapshot color scheme. I've started capturing syntax group links because some color schemes use them in their implementation (notably ir_black and zenburn).

I've noticed that my minimized konsole/eterm settings are always blank. Either I've broken it, it was already broken, or it *is* working but the konsole/eterm colors are never different from the xterm colors.

Future work: (*please* comment if you have suggestions or concerns)

>> :CSApproxSnapshot
Try to do a hard-reset of highlight groups and reload the color scheme before snapshotting, to give a more exact picture of the color scheme.
Set the default filename as ${CSA-install-dir}/colors/${scheme}-approx.vim
Set to default to g:colors_name

>> :CSApproxSnapshotCurrent
Similar to above, but don't do a hard reset, to capture any manual customizations by the user.
Set the default filename as ${CSA-install-dir}/colors/${g:colors_name}-${USER}-approx.vim

I'm not sure this one is necessary. Do you think anyone will use it? I mainly plan this because it's closer to the original behavior of :CSASnapshot.

>> :CSApproxSnapshotAll
Snapshot all color scheme files that can be found into
Set default to $CSA/colors/

>> fall back to -approx.vim
In a non-gui, pre-7.3 environment, check for on-disk snapshots before giving an error.

Thanks in advance for your time.
--buck