When I'm using Vim 7.3 to edit a large PHP file (2000 lines), if I switch from insert mode to normal mode there is a delay of about 1-2 seconds.
It is quite frustrating when I need to make some quick edits.
On smaller files (300 lines) there is no delay. The reverse (normal mode to insert mode) there is also no delay.
The issue is related to syntax highlighting, because if I turn syntax highlighting off, the problem goes away.
:syntax off
Some things I have tried to no avail:
- turning folding off
- turning matchparen plugin off
- turning all custom plugins off
- using "largefile" plugin
Note, other than this insert-to-normal mode switching issue, nothing else about the syntax highlighting appears slow for me when editing large files. I.e. typing text in insert mode performs fine, completion works fine, etc.
This makes me think that it is something that can be fixed.
I have tested this in gVim and console vim (under cygwin) on Windows XP.
Does anyone know what could be the issue?
Or is anyone else able to reproduce this problem? I have googled, but can't see anyone else with this same issue which is weird.
UPDATE: I think it may be related only to PHP syntax highlighting. I just tried coffeescript and javascript files with 2000+ lines and did not have any issues with them.