Commit c14623ce authored by Murukesh Mohanan's avatar Murukesh Mohanan

vim-plug update, guard for YCM

parent d157bb07
This diff is collapsed.
...@@ -93,6 +93,20 @@ inoremap <Up> <C-o>gk ...@@ -93,6 +93,20 @@ inoremap <Up> <C-o>gk
nnoremap <Down> gj nnoremap <Down> gj
nnoremap <Up> gk nnoremap <Up> gk
function! YCMInstallCmd()
let l:ycm_cmd = 'python2 ./install.py'
if executable('c++')
let l:ycm_cmd .= ' --clang-completer'
endif
if executable('go')
let l:ycm_cmd .= ' --gocode-completer'
endif
if executable('npm')
let l:ycm_cmd .= ' --tern-completer'
endif
return l:ycm_cmd
endfunction
"execute pathogen#infect() "execute pathogen#infect()
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'murukeshm/vim-manpager' Plug 'murukeshm/vim-manpager'
...@@ -112,9 +126,11 @@ Plug 'gabrielelana/vim-markdown', {'for': 'markdown'} ...@@ -112,9 +126,11 @@ Plug 'gabrielelana/vim-markdown', {'for': 'markdown'}
Plug 'majutsushi/tagbar', {'for': ['cpp', 'c', 'go', 'sh', 'js']} Plug 'majutsushi/tagbar', {'for': ['cpp', 'c', 'go', 'sh', 'js']}
Plug 'fatih/vim-go', {'for': 'go'} Plug 'fatih/vim-go', {'for': 'go'}
" YCM command lifted from vim-plug readme if executable('cmake')
Plug 'Valloric/YouCompleteMe', { 'do': 'python2 ./install.py --clang-completer --gocode-completer --tern-completer', 'for': ['cpp', 'c', 'go', 'sh', 'js', 'vim'] } " YCM command lifted from vim-plug readme
autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable() | endif Plug 'Valloric/YouCompleteMe', { 'do': YCMInstallCmd(), 'for': ['cpp', 'c', 'go', 'sh', 'js', 'vim'] }
autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable() | endif
endif
Plug 'godlygeek/tabular' Plug 'godlygeek/tabular'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment