How to use vim-youcompleteme

From the package-specific README (/usr/share/doc/vim-youcompleteme/README.Debian):

vim-youcompleteme
-----------------

A code completion plugin for Vim. This package designed to work with
vim-addon-manager. To use this addon install vim-addon-manager package first
and use this command:

  $ vam install youcompleteme

vim-addon-manager is recommended by when vim-youcompleteme, so there's a good chance it is already installed. If not:

sudo apt-get install vim-addon-manager

And then run the command given in the README. vim-syntastic is only available for 14.10, from the results in the package index, but given that it explicitly depends on vim-addon-manager, I'd say something similar applies to it as well.


In 18.04 it's just;

sudo apt install vim-youcompleteme
vim-addon-manager install youcompleteme

The ubuntu version does not support Java so you may want the latest version depending on your language of choise, so alternativly;

cd ~/.vim/bundle
git clone --depth=1 https://github.com/Valloric/YouCompleteMe.git
cd YouCompleteMe
git submodule update --init --recursive
./install.py --all

Try something like this :

Put this at the top of your .vimrc to use Vundle.

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'


" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

Run following to install:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
cd ~/.vim/bundle
git clone https://github.com/Valloric/YouCompleteMe.git
cd YouCompleteMe
git submodule update --init --recursive
./install.sh --clang-completer

Tags:

Vim Plugin