VIM Plugin - YouCompleteMe
Install
Make sure you have Vim 7.4.1578+ with Python 2 or Python 3 support.
Use Git
1 | :~$ sudo apt-get install build-essential cmake python-dev python3-dev |
Use Vim Plugins - Vundle
- Add YouCompleteMe To
.vimrc
.1
2
3
4
5
6
7:~$ vim .vimrc
....
call vundle#begin()
....
Plugin 'ycm-core/YouCompleteMe'
call vundle#end()
.... - Launch
vim
and run:PluginInstall
Problem
The ycmd server SHUT DOWN
When you open vim
, see the mesage “The ycmd server SHUT DOWN (restart with :YcmRestartServer)”.
- remove YouCompleteMe
1
:~$ rm -r .vim/bundle/YouCompleteMe
- see Use Git, reinstall YouCompleteMe.
YouCompleteMe unavailable
When you open vim
, see the message “YouCompleteMe unavailable: unable to load Python”.
Check vim
does have python support
- Method 1As you can see
1
2
3:~$ vim --version | grep python
+cryptv +linebreak -python +vreplace
+cscope +lispindent -python3 +wildignore-python
and-python3
, VIM doesn’t support Python. - Method 2
Launchvim
and run:py pass
to see whether supports Python2, and run:py3 pass
to see whether supports Python3.
Method
- install
vim-gtk
orvim-nox
1
2
3
4:~$ sudo apt-get install vim-nox
:~$ vim --version | grep python
+cryptv +linebreak -python +vreplace
+cscope +lispindent +python3 +wildignore - Use
neovim
instead ofvim
.1
2:~$ sudo apt-get remove vim vim-*
:~$ sudo apt-get install neovim - Building Vim from source. See github
References:
- vim plugin - markdown
- github - YouCompleteMe
- github - Vundle