Browse Source

vim: swap phpcd with phpactor

coc
Schneider 5 years ago
parent
commit
16321b7ce1
Signed by: schneider GPG Key ID: 3F50B02A50039F3B
  1. 4
      init.vim
  2. 23
      vim/ftplugin/php.vim

4
init.vim

@ -84,7 +84,9 @@ Plug 'rhysd/vim-clang-format', { 'for' : ['c', 'cpp', 'java'] }
" PHP{{{
"Plug 'shawncplus/phpcomplete.vim', { 'for': 'php', 'do': 'curl -Ss http://vim-php.com/phpctags/install/phpctags.phar > ~/bin/phpctags && chmod +x ~/bin/phpctags' }
Plug 'lvht/phpcd.vim', { 'for': 'php', 'do': 'composer install' }
"Plug 'lvht/phpcd.vim', { 'for': 'php', 'do': 'composer install' }
Plug 'phpactor/phpactor', {'for': 'php', 'do': 'composer install'}
Plug 'kristijanhusak/deoplete-phpactor', { 'for': 'php' }
Plug 'captbaritone/better-indent-support-for-php-with-html', { 'for': 'php' }
Plug 'lumiliet/vim-twig', { 'for': [ 'php', 'html' ] } " Twig templates
Plug 'Rican7/php-doc-modded', { 'for': 'php' } " Automatic phpdoc comments

23
vim/ftplugin/php.vim

@ -1,4 +1,27 @@
let g:deoplete#ignore_sources = get(g:, 'deoplete#ignore_sources', {})
let g:deoplete#ignore_sources.php = ['omni']
" {{{ phpactor
" Include use statement
nmap <Leader>u :call phpactor#UseAdd()<CR>
" Invoke the context menu
nmap <Leader>mm :call phpactor#ContextMenu()<CR>
" Invoke the navigation menu
nmap <Leader>nn :call phpactor#Navigate()<CR>
" Goto definition of class or class member under the cursor
nmap <Leader>o :call phpactor#GotoDefinition()<CR>
" Show brief information about the symbol under the cursor
nmap <Leader>K :call phpactor#Hover()<CR>
" Transform the classes in the current file
nmap <Leader>tt :call phpactor#Transform()<CR>
" Generate a new class (replacing the current file)
nmap <Leader>cc :call phpactor#ClassNew()<CR>
" Extract expression (normal mode)
nmap <silent><Leader>ee :call phpactor#ExtractExpression(v:false)<CR>
" Extract expression from selection
vmap <silent><Leader>ee :<C-U>call phpactor#ExtractExpression(v:true)<CR>
" Extract method from selection
vmap <silent><Leader>em :<C-U>call phpactor#ExtractMethod()<CR>
"}}}
nnoremap <leader>h :call PhpDocSingle()<CR>
Loading…
Cancel
Save