vim-plugin “YouCompleteMe”

YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine for Vim. It has several completion engines:

  • an identifier-based engine that works with every programming language,
  • a Clang-based engine that provides native semantic code completion for C/C++/Objective-C/Objective-C++ (from now on referred to as “the C-family languages”),
  • a Jedi-based completion engine for Python 2 and 3 (using the JediHTTP wrapper),
  • an OmniSharp-based completion engine for C#,
  • a combination of Gocode and Godef semantic engines for Go,
  • a TSServer-based completion engine for TypeScript,
  • a Tern-based completion engine for JavaScript,
  • a racer-based completion engine for Rust,
  • and an omnifunc-based completer that uses data from Vim’s omnicomplete system to provide semantic completions for many other languages (Ruby, PHP etc.).

Installation :

apt-get install build-essential cmake
apt-get install vim-gnome
mkdir -p ~/.vim/bundle/
cd ~/.vim/bundle/

mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
git clone https://github.com/Valloric/YouCompleteMe.git
cd YouCompleteMe
git submodule update --init --recursive
./install.py --clang-completer

 

Enable in vimrc :

Add following lines in vimrc

filetype off

call pathogen#infect()
call pathogen#helptags()

filetype plugin indent on
syntax on

let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"
let g:ycm_key_list_select_completion=[]
"let g:ycm_key_list_previous_completion=[]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s