I know this subject has been addressed a number of times, it's in the todo list, it's in the faq also and even there is a workaround suggested in the wiki.
I just would like to add that I've been dealing with it for a time now using foldmethod=expr with an expression that gets some hints from the syntax engine by means of synID and related methods. The performance is good even if folding is still relying on the syntax engine. But I've never implemented a generic solution based on this idea, that is an expression that looks for a fold syntax item in the current line in a language agnostic way. I don't think that it's possible because I don't know of a way to retrieve the fold flag from a syntax item and also start/end matches could be 0-length and so have no representative char in the current line. But in general the approach seems to work reasonable well as a workaround. exprs are much easier to write when you can get advantage of syntactic hints at strategic points.
What do you think about this approach? I'm afraid it could incur the same performance issues that foldmethod=syntax although, in practice, it didn't. I've no idea why this is so.
Anyway +1 for the slow syntax folding issue.
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@...
For more options, visit https://groups.google.com/groups/opt_out.