Closed ropeladder closed 4 years ago
Probably not, folding has to look at potentially a lot of surrounding context and VimL is slow. But if you figure out any improvements do let me know.
Just wanted to follow up and mention that I recently found vim-fastfold and that it does a great job of speeding up text editing. (as I understand it, it stops vim from recalculating folds unless you are operating directly on a fold)
For all I know there may be some reasons why you wouldn't want to have this be default folding behavior (or would want to keep it as a separate plugin), but for me it's been a huge improvement.
I'm using vim on a 2011 netbook and it's quite slow editing markdown files with folding enabled.
I'm testing on a markdown file that is around 36kb and has around 25 headers/sections.
To test I go to a random line in the file, enter insert mode, mash the keyboard, and then hit ctrl-w a few times to delete everything I just wrote.
Profiling shows it's the MarkdownFold function:
Is there any way to speed this up?