This page covers how to setup and use YouCompleteMe (Ycm) for Gecko/Mozilla-Central development. Setup times will take about ~15 minutes.
Setup (Vim)
- Make sure you're running vim 7.4 or later. On Mac I found it easier to run 'brew install vim' and replace the system vim by creating a symbolic link at /usr/bin/vim OR you can use MacVim. Both should work now. If you using MacPorts you can use something like 'port install vim +python27'
- Install Vundle (the plugin manager that the YouCompleteMe docs recommend, although you can use vim-plug instead):
git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/Vundle.vim
- Add the following to the start of your .vimrc:
" Vundle vimrc 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 g:ycm_confirm_extra_conf = 0 " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'Valloric/YouCompleteMe' " End configuration, makes the plugins available call vundle#end() filetype plugin indent on
- Consider all adding the following to your .vimrc if you want to use CTRL+]:
map <C-]> :YcmCompleter GoToImprecise<CR>
- Launch vim and run :PluginInstall
- Build Ycm with the clang option. Follow the quick setup here: https://github.com/Valloric/YouCompleteMe
OSX: If Ycm is having trouble finding system headers, or just in case, run the following:
$ xcode-select --install
Setup (Emacs)
- Use the emacs-ycmd package. Follow the setup from the README. It's available from MELPA.
Reporting a Bug
If you encounter any issues please file a bug and make it depend on bug 892973.
Tips
Add your tips here
- Use ':YcmDiag' if the file is showing unexpected error or completion issue(s). This will show the errors that clang is hitting.
- If you don't want to see the preview window after insertion, please try to add "g:ycm_autoclose_preview_window_after_insertion = 1" into your "~/.vimrc".
Document Tags and Contributors
Tags:
Contributors to this page:
micbou,
teoli,
Jonathan_Watt,
Tingyu,
borischiou,
jrmuizel,
bgirard_github,
Sheppy,
kewisch,
adithya_mani
Last updated by:
micbou,