Wednesday, March 31, 2010

Re: Why is there no :foldupdate?

On Wed, 31 Mar 2010, Paul wrote:

> On Wed, Mar 31, 2010 at 03:02:41PM +0200, Christian Brabandt wrote:
> > But this looks so fundamental, that I am wondering, whether I am the
> > only one who is missing :foldupdate. Does anybody else think so? Or
> > am I missing something obvious?
>
> You are not the only one. Every once in a while I will somehow see my
> folds messed up after some serious editing, when I know they are
> correct, and have to quit and re-edit the file in order to have them
> show correctly.

I generally just type Ctrl-L to clear and redraw the screen. For most
filetypes I prefer fdm=syntax, so maybe something's different with
fdm=expr.

I notice the improper folds most frequently when I've just added another
branch to a conditional (e.g. turning something with the structure
if(1){}else{}
into
if(1){}elsif(2){}else{}
) but I can't seem to come up with a good minimal case. I'll try to do
that next time I notice the problem.


In case they affect anything, I also still have the following mappings
in place:

aug NoInsertFolding
au!
au InsertEnter * let b:oldfdm = &l:fdm | setlocal fdm=manual
au InsertLeave * let &l:fdm = b:oldfdm
aug END

They have their own problems (referenced in another thread), but are
better than the madness of folds changing mid-insert.

--
Best,
Ben

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

To unsubscribe, reply using "remove me" as the subject.

No comments:

Post a Comment