On 1/12/09, Yue Wu wrote: > > It's too complicated, if I want to save/restore highlight for others, > it would need a big change. No other simple and generic way?
Well, using synIDattr() you should be able to get all the information you need about any highlight group; which you can use to save it and restore it later. CSApprox can serve as an example of gathering that info (s:Highlights()). Though it never restores them it does use a dictionary with the same sort of structure as s:Highlights() returns to set colors later (s:SetCtermFromGui()). My way is even more complicated than Tony's, but is by necessity completely generic, and doesn't rely on :redir (which is very slow, and is non-trivial to parse). ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---