Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does jedi-vim conflict with YouCompleteMe?

YouCompleteMe (YCM) and jedi-vim are two vim plugins that provide autocompletion, and both use jedi underneath for Python. However it's nice to have both since jedi-vim provides some useful features in addition to documentation, like 'go to definition' and 'view docstring', while YouCompleteMe works with other languages.

Since both provide Python autocomplete, is any special configuration needed to prevent the two plugins from conflicting? Or will jedi-vim's autocompleter simply override YCM in Python?

like image 258
joeforker Avatar asked Apr 29 '15 17:04

joeforker


1 Answers

The most obvious conflict is not knowing whether you are using YCM or Jedi for autocompletion. In that case the simplest thing to do is to disable Jedi's autocompletion with a line in .vimrc, and use YCM's awesome (Jedi-powered for Python) autocomplete everywhere.

let g:jedi#completions_enabled = 0

The key mappings are not too bad. Both plugins map <leader>d (where <leader> defaults to \) but it doesn't matter, Jedi will override \d in Python files only and that particular YCM feature is not supported in Python.

like image 114
joeforker Avatar answered Nov 07 '22 01:11

joeforker