spf13 / PIV

PHP Integration environment for Vim
250 stars 36 forks source link

Mechanism for loading function docs #30

Closed tasuki closed 10 years ago

tasuki commented 10 years ago

Hi, this is probably rather a question than a bug.

Shift+K is supposed to load the docs for a function. It does when I load PIV using call pathogen#runtime_append_all_bundles(). However, when loading Pathogen using call pathogen#infect(), it doesn't (while :h exit still shows the relevant php documentation).

Extensive grepping didn't lead me to find where the shift+K map is defined. How does this work? (Or, why doesn't it work with pathogen infect?)

spf13 commented 10 years ago

Shift K is vim's default for looking up the definition of something. PIV loads the PHP manual as a dictionary to enable this to work.

Steve Francia spf13.com @spf13

On Dec 20, 2013, at 7:12 AM, Vit Brunner notifications@github.com wrote:

Hi, this is probably rather a question than a bug.

Shift+K is supposed to load the docs for a function. It does when I load PIV using call pathogen#runtime_append_all_bundles(). However, when loading Pathogen using call pathogen#infect(), it doesn't (while :h exit still shows the relevant php documentation).

Extensive grepping didn't lead me to find where the shift+K map is defined. How does this work? (Or, why doesn't it work with pathogen infect?)

— Reply to this email directly or view it on GitHub.

tasuki commented 10 years ago

Thanks, that helps, the magic is done in plugin/piv.vim:

autocmd FileType php set kp=:help

(which sets keywordprg to use internal help instead of the default man pages)

For some reason when FileType is php.html (which should mean php or html), this doesn't kick in.