57974Re: Patch to allow ctermfg or bg values as #rrggbb
- Jul 24, 2010On 21-Jul-2010 20:57, Matt Wozniski wrote:
> The down side is that it's a bit slow (as Dominique pointed out), butIf you don't change your colorscheme often, CSApprox.vim (again, thanks Matt for
> I have a version in my sandbox that should hopefully help a bit with
this wonderful plugin!) allows to take a static snapshot, which avoids the
runtime penalty of translating all colors on each Vim launch; instead, only the
generated snapshot is sourced.
I have my own colorscheme, and here's how I generate a new snapshot whenever I
have modified it (notice how I have put CSApprox in .vim/, not .vim/plugin/, so
it's only sourced on-demand for this one-time conversion):
gvim -c "runtime CSApprox.vim|CSApproxSnapshot!
In my .vimrc, the following fragment detects a color terminal and then sources
the snapshot. (Though this isn't strictly necessary, it falls back to the
original, handwritten colorscheme when run in a plain terminal or the GUI.)
let g:color_terminal = ! has('gui_running') && &t_Co >= 88
" There may exist a high color snapshot of my colorscheme generated by
catch /^Vim\%((\a\+)\)\=:E185/ " catch error E185: Cannot find color scheme
This works well for me, so I would recommend such an approach to try in case
you're concerned about the startup performance.
-- regards, ingo
-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --
-- http://vim.sourceforge.net/account/profile.php?user_id=9713 --
You received this message from the "vim_dev" 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
- << Previous post in topic