When does VIM overestimate foldexpr?

I am trying to find out when VIM foldexpr reevaluated.

In my case, I have set foldexpr=MySpecialFunction(v:lnum) , and it seems to me that MySpecialFunction is called only when the buffer is opened or when the line closing the fold is deleted.

Intuitively, I would suggest that I can trigger a reevaluation using ctrl-l , but that is not the case.

What it's worth: my version of VIM is 7.3

+4
source share
1 answer

I think there is no way to document to re-evaluate foldexpr. I asked about this a while ago in vim mailinglist. As a result, a patch was made that made zx and zX overestimate foldexpression, which was enough for me.

I noticed only two ways to force foldexpression reevaluation: to have a noop filter (for example, a filter through cat) or reset foldexpression.

See the discussion in the vim mailing list: http://groups.google.com/group/vim_dev/msg/6f13fa0dfcb06317

+1
source

All Articles