3 ms·
So there are two problems I guess, user-based and technical. User problem: since I use Vim for everything, my expectations as far as responsiveness goes are pr
by bee_rider 4y ago
So there are two problems I guess, user-based and technical.
User problem: since I use Vim for everything, my expectations as far as responsiveness goes are probably not calibrated correctly. It is almost always very good, so the moments of badness are noticeable. The user (me) is unreasonably picky.
Technical: LaTeX syntax highlighting. It is I’m pretty sure, generally known to be a bit of a pain. Lots of nested environments that can go back dozens of lines and change how commands are interpreted. It is happy in a decent (not huge or anything) sized Fortran code, so I think config is mostly OK. Maybe I should look around and see if there’s a nice LaTeX plugin out there.
- tambourine_man 4y agoI think you found the culprit. Syntax highlighters are notoriously slow. You have every right to have high expectations for performance with Vim
- celrod 4y agoPerhaps tree sitter can help the syntax highlighting? https://github.com/latex-lsp/tree-sitter-latex https://github.com/latex-lsp/tree-sitter-latex
- lhl 4y agoRelated, but Neovim has experimental treesitter support (w/ Latex) built in these days: https://github.com/nvim-treesitter/nvim-treesitter https://github.com/nvim-treesitter/nvim-treesitter Depending on how hard you push it, Neovim can also be noticeably faster than Vim (notably Lua/LuaJIT being much faster than VimScript)
- pletnes 4y agoSome vim plugins are slow. Fortran highlighting used to be super slow for certain use cases 10 years ago. I think there were some bad regexes. Latex documents are often long (cf other code) and the syntax rules are complex.