folding simultaneously in both windows

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

folding simultaneously in both windows

Kamaraju Kusumanchi-3
While editing fortran programs, I manually create and open some folds.
In order to save and restore the folds from one session to another, I

au! BufWinLeave *.f90 mkview
au! BufWinEnter *.f90 loadview

But there is a problem with the above mechanism. If I am editing a
.f90 file and if I do a vertical split (:vs) then I will have two
separate panes (left and right). Now I create/change folds in the
right pane and close it. Then I create/change folds in the left pane
and close it. The fold changes that were made in the right window are
lost. But I would like to preserve them too.

The above problem can be overcome if I can synchronize fold changes
between the left and right panes. Is there any way to do this? Is
there any other way to overcome the original problem?