The first problem is caused by Vim's syntax folding being so slow compared to other methods; see [help todo.txt] and search for "folding with 'foldmethod'". The second problem applies to any automatic folding method—be it marker, syntax, or expression folding—inserting text which starts a fold will automatically open all folds beneath the insertion point. To accomplish the workaround, use the InsertEnter and InsertLeave autocmd events. Since 'foldmethod' is a window-local option, store the old value in a window-local variable:
| Graph IRI | Count |
|---|---|
| http://dbkwik.webdatacommons.org | 14 |