|Summary:||=app-editors/vim-8.0.1298: php syntax highlighting broken|
|Product:||Gentoo Linux||Reporter:||Tom Dexter <digitalaudiorock>|
|Component:||Current packages||Assignee:||Vim Maintainers <vim>|
|Package list:||Runtime testing required:||---|
Description Tom Dexter 2017-12-26 21:52:55 UTC
Today I upgraded app-editors/vim (and vim-core / gvim) from app-editors/vim-8.0.0386 to app-editors/vim-8.0.1298, and the syntax highlighting for php is quite broken. When a file is first opened the highlighting tends to work, but if you jump into the middle of the script (for example by searching for text) it stops working. Once that happens it appears you need to go to the top of the file and disable/enable highlighting to get it working. Once I copied the /usr/share/vim/vim80/syntax/php.vim from version 8.0.0386 to my ~/.vim/syntax directory, it works fine again, so it's clearly an issue with the syntax file itself. I'm still trying to determine if there's any upstream bug related to this.
Comment 1 Tom Dexter 2017-12-26 22:06:09 UTC
I have to amend my first assessment of this: Using the old php.vim doesn't fix this as I originally thought. The behavior is just random enough that it becomes difficult to pin down. I'm going to downgrade back to the older version to ensure that fixes this, but there's clearly more involved than just that syntax file.
Comment 2 Tom Dexter 2018-07-09 14:07:25 UTC
This appears to be the issue I'm running into. I've yet to try any of the work-arounds suggested there: https://github.com/vim/vim/issues/2790
Comment 3 Tom Dexter 2018-07-09 22:57:10 UTC
As I noted in that vim bug, increasing the redrawtime from the default 2000 to 10000 actually does correct this. It may just be that the new php syntax file (which I believe adds support for newer php versions) has a little more overhead than the old one. Since that vim bug is closed and this work-around seems to do the trick, I doubt there's any reason to leave this open.