on 3/24/2003 9:14 AM Sven Vahar said the following:
> > Please let me know if this helps or you're still stumped.
> Yes, I got it working after inserting "vim:foldmethod=marker" into
> file. It doesn't work without it. Up to 0.18 (?) it did, I dug up
> some of my old files which used to fold without
> "vim:foldmethod=marker" line. Now they don't. Has Creams default
> behaviour changed in this respect?
Up to 0.18, foldmethod=marker was the default. But this meant that
characters were always inserted to mark folds, nice if you intend it,
but bad if you don't realize or understand what is happening. I got
several reports of problems and realized it is best behavior to keep
the existing document as it is as much as possible. We don't like
editing user's documents unless they intend them to be edited!
Thus, your documents folded during older versions of Cream had fold
marks inserted into them, and with a default foldmethod=marker, Vim
recognized them. But now that this setting is no longer on, those fold
marks have no meaning. *And* Vim had not recorded their location in
the view file either, so now you have files with fold marks, but Vim
doesn't realize it.
The modeline solution just notifies Vim that folds are being indicated
via marks. You could also place ":set foldmethod=marker" in a file
called cream-user.vim and you wouldn't need to have a modeline. But
modeline is best if you pass the files to other Vim users--they get
the setting and the folds.
> Also, when I use hotkeys to close/open all folds it works nice but
> when I select from meny then it doesn't work and I get message
> ":call Cream_fold_closeall()" inserted into cursor position.
Whoops, that's a bug. The four "anoremenu" folding items in
cream-menu-tools.vim should not be preceded by <C-o> keystrokes.
Thanks for the catch.
> Anyway, I'll be inserting foldmethod line from now on. Thanks for
> clarifying for me.
Glad that works for you. I'm sorry for the confusion and the change.
It was listed in the ChangeLog and the version announcement but not
clear enough that anyone could figure it out.
Steve Hall [ digitect@... ]
Try Cream... the usability project for Vim!