You can use the SessionLoadPost autocommand to do whatever you like just 
after a session file is sourced.
Caveat: doautoall is used to execute the SessionLoadPost autocommands, 
so they're executed for each loaded buffer.

:help :au
:help SessionLoadPost

If it doesn't hurt to source your script multiple times, you could put 
something like...
:au SessionLoadPost * :runtime after/plugin/mycolor.vim

...in your .vimrc. If your colors file sets something like 
g:colors_name, you might use :finish at the top of it to skip loading 
when it's already loaded. You could also try putting logic in the 
autocommand itself that will cause it to do nothing for all but the 
first buffer...

Brett Stahlman

Steven Woody wrote:
> Hi,
> The colors I set in after/plugin/mycolor.vim can not be kept every time when
> I load (:so) a  previously saved session file. How to overcome this?
> 
> Thanks.
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to