On Tuesday, January 6, 2015 9:16:09 PM UTC-6, Bao Niu wrote:
> On Saturday, January 3, 2015 3:59:14 PM UTC-8, Bao Niu wrote:
> > I read the below documentation:
> > >If you use the "expr" method to define folds, but they are not exactly how
> > >you want them, you could switch to the "manual" method. This will not remove
> > >the defined folds. Then you can delete or add folds manually.
> >
> > It works very well.
> >
> > However, if I want to switch to "marker" instead of "manual", I would lose all the foldings! Is there a way to mix up the expression fold-method with the marker fold-method? Thanks.
>
> Let me clarify it a little bit. What I'm looking for is first using fold-expr to automatically fold up those Python classes and methods/functions, then switching not into manual mode, but *marker* mode and still retain those folds set up by fold-expr. Is this possible with GVim 7.4? Many thanks.
No. Because folds with "marker" method are defined by inserting text into the buffer.
Just changing foldmethod does not modify the buffer for you.
You could perhaps script something that would find all fold start/end locations and modify the buffer to insert markers but that would not be trivial and I'm not sure you'd want to have that happen in a code file anyway.
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment