Reply to message «Adding Session Awareness to a Plugin», sent 23:28:41 19 April 2011, Tuesday by Mathew Brown:
I can see only two different approaches here:
1. Create custom `MkSession {name}' command which will save session file
{name}.vim and near {name}x.vim which will do plugin-related setup (it is what
I
do in vimpluginloader. It is going to be replaced with frawor, so don't use
it).
See 10'th item in `:h :mksession'.
2. Save custom data in a global variable which starts with an uppercase letter
and contains at least one lowercase letter, then use SessionLoadPost event to
actually restore the session. See 2'nd item in `:h :mksession' and search for
`globals' in `:h 'sessionoptions''.
Original message:
> Hi,
> I was wondering if anyone can tell me how to make a plugin session
> aware. For example, I starting using the Highlight plugin over at
> http://www.vim.org/scripts/script.php?script_id=1599 but was
> disappointed to find out that as soon as I saved my session, exited
> and then reloaded my session, all the highlights made in my previous
> session were lost. Other plugins such as the TabName plugin could
> really use this as well. Any ideas? Thanks for your help.
signature.asc
Description: This is a digitally signed message part.
