简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM