Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was using a third-party plugin for markdown (I think it was called pandoc.vim), but for LaTeX files I was using only plugins that come with Vim. The documentation in :help tex-slow did suggest things to put in .vimrc to help make syntax-highlighting faster and I did try all of them. The only thing that solved the lag was disabling syntax highlighting for LaTeX completely.

The slowness I experienced for LaTeX files happened even without any third-party plugins installed, using a one-line .vimrc that only turned on syntax highlighting. So I think it is unfair to say "the slowness has nothing to do with Vim itself". Probably also "or the low power of the netbook" is unjustified, in the sense that the tips in :help tex-slow do likely solve the problem on computers a little beefier than my old netbook (which is probably more than 15 years old at this point). I mean, those suggestions are in the official Vim documentation presumably because they did work for someone.

Think of it this way: if the slowness of LaTeX syntax-highlighting were not a problem in Vim itself (where by "Vim itself" I'm including the vimscript files that ship with Vim, not just the executable), would it be documented in the official Vim documentation?

https://vimhelp.org/syntax.txt.html#tex-slow



As the link shows, the syntax section of the Vim manual offers suggestions to increase speed on slow computers for all syntax categories, tex being one of them. That does not mean all those categories are a problem in Vim itself.

However, I do not mean to deny your actual experiences; I have seen all sorts of performance-related craziness that doesn't make sense, and I fully believe you when you say you had slow editing with near-empty .vimrc. I just find it baffling; for instance, here is a sample of my using vim in an older tablet, with latex syntax highlighting, UltiSnips, builtin terminal and w3m browser without any lag:

https://i.redd.it/p5h7ongm51541.jpg

So, baffling discrepancies; I wish software performance was more predictable.


> As the link shows, the syntax section of the Vim manual offers suggestions to increase speed on slow computers for all syntax categories, tex being one of them. That does not mean all those categories are a problem in Vim itself.

Oh, absolutely! I should have said before that I edited many file types in Vim on that netbook and syntax highlighting was lighting fast on all types except LaTeX. Sorry if I gave the wrong impression. Unfortunately for me, LaTeX is by far what I most wrote at the time, so it was an annoying problem.

> So, baffling discrepancies; I wish software performance was more predictable.

Amen to that! I've even been on the other side of this issue, with some Emacs packages I've written. I've received reports of some operations being very slow that I've been unable to reproduce (even though I continue to use underpowered hardware because I value battery life more than speed —I'm typing this, in Emacs, on a 10 year old Chromebook!).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: