On Apr 15, 1:43 pm, ZyX <zyx....@gmail.com> wrote:
> Reply to message «syntax coloring»,
> sent 11:06:33 15 April 2011, Friday
> by rameo:
>
> > When I start VIM it shows my tabs and reloads my buffers from the last
> > time.
>
> > I use a session to do this.
>
> > au VimEnter * exe "so d:\\Session.vim"
> > au VimLeave * exe "'mksession! d:\\Session.vim'"
>
> You have made just the same mistake as me some time ago: all filetype-related
> files are loaded using an autocommand, but by default no autocommands are
> allowed when you are executing an autocommand, so you should add `nested' just
> after the pattern. By the way, why do you use `exe'? The following works as
> well:
>     augroup SaveRestoreSessions
>         autocmd!
>         autocmd VimEnter * nested source D:\session.vim
>         autocmd VimLeave * nested mksession! D:\session.vim
>     augroup END
>
> See `:h autocmd-nested' for more details.
>
> Original message:
>
>
>
> > When I start VIM it shows my tabs and reloads my buffers from the last
> > time.
>
> > I use a session to do this.
>
> > au VimEnter * exe "so d:\\Session.vim"
> > au VimLeave * exe "'mksession! d:\\Session.vim'"
>
> > My reopened files do not have syntax coloring.
> > I have to do ":e" in every file where I need syntax coloring to view
> > syntax coloring.
>
> > I know that I can add "localoptions" in sessionoptions but this slows
> > down my vim (I noted that it uses 20-25% more CPU). Without
> > "localoptions" my vim is much faster.
>
> > How do you resolve this?
> > Don't you use sessions?
>
>
>
>  signature.asc
> < 1KViewDownload

Great! It does work.
Thanks a lot!

Please let me ask you one more question...
How do you close this session and reopens a custom one (happens once
in a while)?

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to