shawncplus/phpcomplete.vim

Does not seem to load in vim

Closed this issue · 3 comments

acken commented

Hey, this is likely me being an idiot. Did a normal pathogen install and nothing seems to work. The phpcomplete functions does not even show up in vim. Are there any usual suspects to why I would not get it loading?. Tried to run the tests within the bundle and they seemed to run fine.

Running vim 7.4.1689 with YouCompleteMe and some other plugins. Setup phpcomplete for omni completion for php extension.

It's not your fault but more like the lack of documentation on my part.

I unfortunately don't have an example setup with YCM since i don't use it, but the default behaviour is triggered by omni completion. So you type ctrl+xctrl+o and that should trigger the plugin.

The function itself is auto-loaded, so by default you won't see it on the autocompleted function names if you start typing. But you can run :call phpcomplete#CompletePHP(1,2) and that should not return errors if you have the code loaded.

The vim version you have itself have a built-in phpcomplete plugin too (almost the same code sans a few features) so even if pathogen setup is missing you should still be able to have some completion for the above keys.

I use phpcomplete.vim with YouCompleteMe without any problems, here comes my settings:

" Remove some annoying stuff when use omni completion, checkout the vim help for more detail
set completeopt-=preview
set completeopt+=menu,menuone,noinsert,noselect
set shortmess+=c

"Enable php completion
autocmd FileType php        set omnifunc=phpcomplete#CompletePHP

" Use syntax file for keyword completion source
let g:ycm_seed_identifiers_with_syntax = 1

" Use tags file for keyword completion source
let g:ycm_collect_identifiers_from_tags_files = 1

" Use <Tab>/<S-Tab> <C-N><C-P <Down>/<Up> for candidate selection
let g:ycm_key_list_select_completion = ['<TAB>', '<C-N>', '<Down>']
let g:ycm_key_list_previous_completion = ['<S-TAB>', '<C-P>', '<Up>']

" Use <C-F> for manual completion
let g:ycm_key_invoke_completion = '<C-F>'

I'm gonna close this one for housekeeping.
@acken: Let us know if you are still having a problem.