Home » Questions » Computers [ Ask a new question ]

Slowness in Vim's bracket-matching with the default PHP syntax

Slowness in Vim's bracket-matching with the default PHP syntax

I am experiencing a noticeable slowness in Vim's bracket-matching and -highlighting feature. When the cursor is placed over a parenthesis or bracket, there is a delay of about 300ms on the console's responsiveness. As stated, this only seems to occur when working with PHP files. I am running Vim 7.2 on Debian Squeeze with a .vimrc file:

Asked by: Guest | Views: 266
Total answers/comments: 1
Guest [Entry]

"I don't see this locally; the matching parens is instantly highlighted. Try this:

:set filetype=txt

...and see if things improve. If so, something in vim's PHP handling configuration may be a bit out of whack. Do you see the same behaviour on very small PHP files? I'm on 7.2 on ubuntu and not seeing what you're seeing.

Hope this helps!
-Paul

UPDATE: thanks for updating your question to include your .vimrc - this leads to another thing for you to test. Please see if this doesn't help the situation - change php_folding to 1 rather than 2. 2 folds all { } regions so this may be somehow interacting with the parens-matching logic and causing the delay."