0

I've switched from NeoComplete to YouCompleteMe because it has much better intellisense, though I had NeoComplete working much better with Omnicompletion.

NeoComplete was able to automatically provide a popup with the right completions without me having to enter a specific mapping (<C-x><C-v> for Vim commands, <C-x><C-d> for directories, etc.). If I typed colorscheme for example, it would provide completions for all my schemes.

How can I get YouCompleteMe to do the same? At the moment, it overrides the <C-x><C-u> command, but if I want Vimscript or directory completion I have to enter the default key bindings.

2 Answers 2

1

Ycm can cooperate with Shougo/neco-vim

autocmd FileType vim setlocal omnifunc=te#complete#vim_complete


function! te#complete#vim_complete( findstart, base ) abort
   let line_prefix = s:get_input()
   if a:findstart
   let ret = necovim#get_complete_position( line_prefix )
   if ret < 0
    return col( '.' ) " default to current
  endif
   return ret
  else
   return necovim#gather_candidates( line_prefix . a:base, a:base )
  endif
 endfunction

My vim config: t-vim

3

Based on tracyone's vim configuration I have created a fork of necovim that automatically registers as vim omnifunc. Just add the plugin with your favorite vim plugin manager and it will work out of the box with YouCompleteMe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.