On Mon, 12 Jan 2009 23:40:30 +0800, Tony Mechelynck <[email protected]> wrote:
> > On 12/01/09 15:37, Yue Wu wrote: >> On Mon, 12 Jan 2009 22:30:43 +0800, Tony Mechelynck >> <[email protected]> wrote: >> >>> On 12/01/09 15:14, 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? >>>> >>> Tell you users to do ":hi Cursor", write down the result, and restore >>> it >>> by hand when needed. >> >> Thank you. you make me know there isn't a shortcut for it :) >> > > Excuse me if that last post sounded unusually flippant; I had spent > quite some time to write two quite general functions to save and restore > the Cursor highlight regardless of what it is set to, which can be > easily adapted (with an argument to the function) to save any arbitrary > highlight group, just to get the answer: "That's too complicated". Well, > here's how to make it easier: > > 1. Copy my functions to the clipboard and paste them into your vimrc, or > into some plugin. > 2. To save the cursor highlight group, use ":call SaveCursorColor()" > 3. To restore it, use ":call RestoreCursorColor". > > How simple do you want it to be? I'm really sorry for my talking sounds I ignore your excellent functions! Last night is too late, so I didn't look at them clearly and patiently, sorry! About your functions, yes, it works for all hightlights! Thank you! My last talking at last night about a simpler way means it still is complicated comparing with the way like save/restore options, I thought there would be a way like save/restore options for hightlights. Thank you again for your nice functions, I learned from you a way that can save/restore the highlights(Although I want a simpler way, I don't know how to do it in other ways until you tell me), and sorry again for no patiently to see the functions that taking you much time! -- Regards, Van. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
