Vim-PHP-Stuff
Vim-PHP-Stuff copied to clipboard
Parse warning
"php.php" [New File]
Error detected while processing /home/patrick/.vim/syntax/php.vim:
line 63:
E108: No such variable: "b:current_syntax"
my vim version:
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled May 16 2010 22:33:58)
Included patches: 1-436
Simply comment out the unlet b:current_syntax lines.
Still helpful in 2012. Thanks :-)
So there was another issue in another syntax file that led me to this issue with b:current_syntax. I'm not sure how this warning is happening since:
- every syntax file is supposed to declare a
b:current_syntaxfile and - I am using
unlet!where the ! is not supposed to show a warning if the variable doesn't exist
I made a change to the runtime! syntax/html.vim on line 62 to remove the !, which means vim will stop including after the first html.vim file it finds. After updating to the latest commit are people still getting this warning?
If so which vim version? Do you have a custom html.vim in your runtimepath? Any other plugins or settings which might be causing verbose warning messages?
changing the file inside this plugin fixes the problem, but when using vim togather with pathogen and git submodules this can get a bit messed up, since personal changes can't be pushed to origin (unless you are a contributor)
in order to make things work without problem, and still using pathogen for vim plugin management, you have to create a separat file, not part of a plugin which fixes this issue:
creating a syntax/html.vim file with the content
" fix for php plugin
let b:current_syntax='html'
fixed the issue without touching the submodule
i hope this helps people using pathogen ^^