0

I'm trying to use you complete me in vim. Here are the steps I've taken

sudo apt-get install vim    
sudo apt-get install git    
sudo apt-get install clang-3.5    
sudo git clone "https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

I added this to /etc/vimrc and ~/.vimrc

set nocompatible  
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe' 
call vundle#end() 

filetype plugin indent on

issued this shell command

vim +PluginInstall +qall

Didn't get any errors during all the steps above, but when I do this

vim test.cpp

enter insert mode and start typing

\#include

I don't get any code completion. What Am I missing?

1

You ran git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim with sudo. This put it Vundle in /root/. You need to follow the instructions for Vundle and issue the command correctly:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  • your answer is correct. I did this to fix my mistake 1) sudo mv ~/.vim ~/OLDvim 2) mkdir ~/.vim 3) mkdir -p ~/.vim/bundle. Then I did the git without sudo. – John G Jan 26 '17 at 23:47
  • Actually your answer does correct an installation mistake but I still didn't get code completion to work there are lots of steps I took to redo my install but I'll but that in my answer not this comment – John G Jan 26 '17 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.