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? Best regards, Tony. -- -rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed -rwxr-xr-t 4 root 131720 Jan 1 1970 /usr/ucb/vi -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
