-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cache fold levels #3049
Comments
I suppose the initial idea of |
Oh, yes, I think you are right. This is definitely something to consider! I'm a little behind on following up issues lately, so I'll likely not put this at top priority right now, but I'll get around to it unless you (or someone else) beats me to it. 😊 |
Thank you then for the kind consideration ;) This was just for inspiration rather than imposing deadlines; it might be as simple a change as adding the vimtex/autoload/vimtex/fold.vim Line 114 in 44a2f12
|
Yes, I think you are right that this may be quite simple. :) |
I've pushed a branch and opened a PR, see #3054. Let's continue the discussion there. |
To follow up on #2427 (comment) :
Yes, it will once, but then it just spits out the precomputed fold level for each line till the next change.
Whereas I am under the impression that as Vim implements
&foldmethod=expr
the function is called for every line and then each such has to redo the computation.In contrast, this recomputation is only done once, how knows for which line (likely the first), and then stored and retrieved in all subsequent function calls (for higher line numbers).
This might be too apparent an idea, but somehow I never see this caching
The text was updated successfully, but these errors were encountered: