Rohan Kumar
Rohan Kumar

Reputation: 5882

vim YouCompleteMe not working on MacVim

I am a huge fan of vim and I've been using it for the last two years. I'm quite new to web programming. Currently I'm working on Node.js and I wanted some additional plugins which can help me learn this new technology. I installed tern_for_js and YouCompleteMe using Vundle. I also compiled YCM, but I don't see any auto-completion or javascript support. Here is my .vimrc:

syntax on

set number
set laststatus=2
set nocompatible
set expandtab
set shiftwidth=2
set smartindent

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'
Plugin 'bling/vim-airline'
Plugin 'scrooloose/nerdtree'
Plugin 'ternjs/tern_for_vim'
Plugin 'Valloric/YouCompleteMe'
call vundle#end()

:map <F2> :echo 'Current time is ' . strftime('%c')<CR>

set guifont=ProggyCleanTT:h18
colorscheme torte
NERDTree

Can anybody tell me what I'm doing wrong. Or did I miss something? Is there some extra configuration that have to be made?

Upvotes: 0

Views: 797

Answers (1)

sudo bangbang
sudo bangbang

Reputation: 28179

The following lines are crucial for vundle to work correctly

filetype off                  " required

put it before

set rtp+=~/.vim/bundle/Vundle.vim

Turn it back on after vundle end

call vundle#end()
filetype plugin indent on 

Also you don't need :map , map is fine.

Upvotes: 0

Related Questions