"Error ... ../php.vim" Update
I wrote about this annoying "E10" error once before. It doesn't crash anything, it just gives a long error message and pause (/"Enter to continue") every time you open a php file in vim with syntax high-lighting enabled. It's probably triggered by other syntax rule files as well. (Several variants of vim are found in FreeBSD ports under the editors category.)
I wrote to the port maintainer and he pointed out that the "problem" file, "php.vim", is not modified by the ports system. So, I poked around the vim site -- I couldn't possibly be the only person who's run into this -- and I found a setting that can prevent this problem. The E10 error message is described here. The issue is simply a vi-compatibility option that prevents vim from allowing backslashed line-continuations in sourced files (like the php.vim syntax rules script). The error will no longer appear when you disable this option with this vim command:
:set cpo-=C... which can be put into your vimrc file. Which should be "~/.vimrc" for your personal startup file and "/usr/local/share/vim/vimrc" for the system-wide file. (You may need to create the system-wide file.) ... A much more elegant solution than modifying the php.vim file!
With great functionality comes great complexity.
Still, there's a better solution that avoids the error from the beginning regardless of the 'cpo' options: the vim developers ought to modify the php.vim file to remove the backslashed line-continuations. I'm all for neatly formatted code -- but not at the expense of user irritation!
Labels: ports
13 Comments:
just thank you very much :D
This helped me get past the irritation of that error as well, thank you!
Glad to have helped! And thanks for the feedback.
Thanks! This was very helpful, solved my problem.
:help E10
I was setting up Vim in my home directory on a SunOS system when I ran into this problem. Thanks for your solution!
Thx a lot!
You are a star. Very helpful.
I'll add my thanks too. Very helpful!
You're welcome. And, thanks to everyone for the positive feedback. It really is gratifying to find out that this blog has been useful to someone! :)
Many thanks for posting this and saving all some time!
yeah, thanks man
Thanks!
the alternative (more intuitive) syntax:
~/.vimrc:
…
set nocompatible
…
Post a Comment
<< Home