Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642356 - =app-editors/vim-8.0.1298: php syntax highlighting broken
Summary: =app-editors/vim-8.0.1298: php syntax highlighting broken
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Vim Maintainers
Depends on:
Reported: 2017-12-26 21:52 UTC by Tom Dexter
Modified: 2021-03-26 08:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
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:
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.
Comment 4 Larry the Git Cow gentoo-dev 2021-03-26 08:50:17 UTC
The bug has been closed via the following commit(s):

commit bbf9548d7b7f81510dd9252b8f90f830a3796a13
Author:     Conrad Kostecki <>
AuthorDate: 2021-03-26 08:38:15 +0000
Commit:     Conrad Kostecki <>
CommitDate: 2021-03-26 08:44:12 +0000

    app-editors/vim: drop old version
    Dropping all old versions, which do not support slotted lua, while
    current stable does.
    Package-Manager: Portage-3.0.17, Repoman-3.0.2
    Signed-off-by: Conrad Kostecki <>

 app-editors/vim/Manifest            |   4 -
 app-editors/vim/vim-8.2.0360.ebuild | 320 ------------------------------------
 app-editors/vim/vim-8.2.0508.ebuild | 320 ------------------------------------
 app-editors/vim/vim-8.2.0638.ebuild | 320 ------------------------------------
 app-editors/vim/vim-8.2.0814.ebuild | 320 ------------------------------------
 5 files changed, 1284 deletions(-)