Vim YouCompleteMe configuration

后端 未结 5 1330
孤独总比滥情好
孤独总比滥情好 2021-01-31 05:01

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 c

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 05:16

    Everything that the folks here have said is correct. I just want to add that as of 2017, the "install.sh" script is deprecated. Now, you have to use the install.py script instead by typing

    ./install.py --clang-completer
    

    Also, in your .vimrc file, instead of ".vim/bundle/blahblahblah", you'll need to add a "~/" in front of the address by adding:

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

    to your .vimrc file, to give it an absolute path from the Home directory so that Vim can find the ".ycm_extra_conf.py" file. Otherwise, you might experience some funny behavior.

提交回复
热议问题