Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim YouCompleteMe configuration

Tags:

i just installed YouCompleteMe for Vim through vundle. It works, but it shows only the words contained in the current file. I want to use it to develop c++ programs, how can i configure it to show autocompletion from c++ headers file in /usr/include for example? Thanks a lot.

like image 808
mastergap Avatar asked Apr 28 '13 14:04

mastergap


Video Answer


2 Answers

You need to navigate to ~/.vim/bundles/YouCompleteMe and run the installation script with --clang-completer, so do ./install.sh --clang-completer. After it finishes you should have support for C like languages.

You may also need to place let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py' in your ~/.vimrc.

like image 172
Battleroid Avatar answered Sep 24 '22 12:09

Battleroid


I have installed with pathogen. I tried the above instructions with ./install.sh --clang-complete. After this, it did not work, and I indeed had to add the path. But it was different than in another reply here, namely

let g:ycm_global_ycm_extra_conf = '.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py' 

so there is an extra "third_party/ycmd" in the path.

like image 30
deph Avatar answered Sep 23 '22 12:09

deph