Monday, February 2, 2015

How to preserve manually defined folds when switching to expr within a session?

I use a plugin that uses expr foldmethod. From time to time I want the flexibility to manually define my folds. I just switch to manual by:
setlocal foldmethod=manual
and all those foldlevels calculated by the expr is still there, which is perfect!

However, when later on I want to use that expr mode to fold some newly added content up again, there seems no easy way. If just switch back by:
setlocal foldmethod=expr
I'd lose all my manually defined foldlevels! Is there a way to preserve my manually defined folds when switching back to expr?

Thanks.

--
--
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.

No comments:

Post a Comment