On Thu, 4 Feb 2010, Matt Wozniski wrote: > On Thu, Feb 4, 2010 at 6:16 PM, Ben Fritz <[email protected]> wrote: > > > > > > On Feb 4, 4:04 pm, Matt Wozniski <[email protected]> wrote: > >> > >> Couldn't you do something like this: > >> > >> au InsertEnter * let b:oldfdm = &l:fdm | setlocal fdm=manual > >> au InsertLeave * let &l:fdm = b:oldfdm > >> > >> As far as I can see, that should get around the problem... But > >> maybe I'm missing something? > >> > > > > If you have manually opened/closed folds, setting the foldmethod > > will re-apply the fold level. Or maybe it will set the foldlevel to > > zero, I'm not sure. Regardless, your carefully configured folds are > > messed up. > > It seems to work fine in my testing. Can you give me an example of a > place where it fails?
It also seems to work fine in my testing. Thanks a bundle. I thought I recalled the behavior Ben F mentioned (auto-re-closing folds when changing foldmethod), but I couldn't replicate it with my current settings. I also suspected it might have something to do with using &l:fdm instead of &fdm, but even switching to global foldmethod=syntax (as opposed to Perl/PHP-buffer-specific local fdm's) didn't make a difference. -- Thanks, Ben (H) -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php
