joonty / vim-phpqa

PHP QA tools for Vim
http://www.joncairns.com
MIT License
290 stars 32 forks source link

Error add_ok #1

Closed stephpy closed 12 years ago

stephpy commented 12 years ago

Hi, i've an error when i launch :Phpcs or :Phpmd, i think that's the same issue on Phpcc ...

The problem is there:

exe ":sign place 4782 name=" . sign . " line=" . line . " file=\".expand(\"%:p\")"
#E158: Invalid buffer name: ".expand("%:p")

I fix quote by doing:

exe ":sign place 4782 name=" . sign . " line=" . line . " file=\"".expand("%:p")."\""
#E158: Invalid buffer name: ""

I'm not pro in vim and may you have an idea to retrieve correct buffer name or may it's related to my configuration:

Mac OS X 10.6 VIM 7.3

Have you any idea ?

Thank you.

joonty commented 12 years ago

Hi, thanks for raising that. The reason it isn't working for you is that there are two modes that the script can run in: one with perl, one in normal vim. It uses perl if possible for speed, and it's part of the quickhigh vim plugin that I incorporated into my plugin.

Basically it looks like your Vim installation isn't compiled with perl support. You can either try recompiling, or you can wait for me to find the time to fix it :)

If you're using macports, you can uninstall the current vim and re-install with perl support (and more) with:

sudo port install vim +perl +python +tcl +ruby

Hope that helps.

Thanks

stephpy commented 12 years ago

Han ! You're right, i have not perl extension, i'll compile my vim to see what's the benefit :)

IMHO it would be great to disable this method if vim is not compiled with perl to not throw this error, i'll make a PR if you think that's useful.

If i have time, i'll look at how to fix this bug

joonty commented 12 years ago

Yeh that's great if you're happy to try and fix it! I'll also take a look when I can.

On Apr 18, 2012 5:02 PM, "Stéphane PY" < reply@reply.github.com> wrote:

Han ! You're right, i have not perl extension, i'll compile my vim to see what's the benefit :)

IMHO it would be great to disable this method if vim is not compiled with perl to not throw this error, i'll make a PR if you think that's useful.

If i have time, i'll look at how to fix this bug


Reply to this email directly or view it on GitHub: https://github.com/joonty/vim-phpqa/issues/1#issuecomment-5202112