Commit 8ea2d08f authored by Murukesh Mohanan's avatar Murukesh Mohanan

vim-plug update, guard for YCM

parent 668769b0
Pipeline #242 skipped
This diff is collapsed.
......@@ -93,6 +93,20 @@ inoremap <Up> <C-o>gk
nnoremap <Down> gj
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()
call plug#begin('~/.vim/plugged')
Plug 'murukeshm/vim-manpager'
......@@ -112,9 +126,11 @@ Plug 'gabrielelana/vim-markdown', {'for': 'markdown'}
Plug 'majutsushi/tagbar', {'for': ['cpp', 'c', 'go', 'sh', 'js']}
Plug 'fatih/vim-go', {'for': 'go'}
" YCM command lifted from vim-plug readme
Plug 'Valloric/YouCompleteMe', { 'do': 'python2 ./install.py --clang-completer --gocode-completer --tern-completer', 'for': ['cpp', 'c', 'go', 'sh', 'js', 'vim'] }
autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable() | endif
if executable('cmake')
" YCM command lifted from vim-plug readme
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'
......
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