automate mkview/loadview

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

automate mkview/loadview

Samuel Wright
Hi

Recently discovered the joys of folding, woo hoo!

What I would like to know if how to automate a :mkview when I
close/save a file, and :loadview when I open it?

Found this in a tips file somewhere, to add this to vimrc

autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* silent loadview

But it does not seem to work

Thanks

Sam
Reply | Threaded
Open this post in threaded view
|

Re: automate mkview/loadview

Yegappan Lakshmanan
Hi,

On 8/17/05, Samuel Wright <[hidden email]> wrote:

> Hi
>
> Recently discovered the joys of folding, woo hoo!
>
> What I would like to know if how to automate a :mkview when I
> close/save a file, and :loadview when I open it?
>
> Found this in a tips file somewhere, to add this to vimrc
>
> autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* silent loadview
>

The above two autocommands should be placed in separate lines in the
.vimrc file. Are you using the following in the .vimrc file?

autocmd BufWinLeave * mkview
autocmd BufWinEnter * silent loadview

- Yegappan

> But it does not seem to work
>
> Thanks
>
> Sam
>