aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2017-02-08 17:14:01 +0100
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2017-02-08 17:14:01 +0100
commita4ce31d3ecd6285878a9d226ef81c1c0db2ce39a (patch)
treef43e76530831b128549e2c9cfe6952e3ef2557ea
parent0a995f4892dca7018ebbf2ec85a8bbc5065ff81d (diff)
downloaddotfiles-a4ce31d3ecd6285878a9d226ef81c1c0db2ce39a.tar.gz
dotfiles-a4ce31d3ecd6285878a9d226ef81c1c0db2ce39a.tar.bz2
dotfiles-a4ce31d3ecd6285878a9d226ef81c1c0db2ce39a.zip
Added conditional YCM options
-rwxr-xr-xvim/.vim/vimrc17
1 files changed, 16 insertions, 1 deletions
diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc
index b5d7309..a353d2c 100755
--- a/vim/.vim/vimrc
+++ b/vim/.vim/vimrc
@@ -14,7 +14,17 @@ Plug 'unblevable/quick-scope'
14Plug 'vim-airline/vim-airline-themes' 14Plug 'vim-airline/vim-airline-themes'
15 15
16if has('python') || has('python3') 16if has('python') || has('python3')
17 Plug 'Valloric/YouCompleteMe', {'do': './install.py --clang-completer'} 17 let g:ycm_install_command = './install.py --clang-completer'
18
19 if executable('node') && executable('npm')
20 let g:ycm_install_command .= ' --tern-completer'
21 endif
22
23 if executable('go')
24 let g:ycm_install_command .= ' --gocode-completer'
25 endif
26
27 Plug 'Valloric/YouCompleteMe', {'do': g:ycm_install_command}
18endif 28endif
19 29
20call plug#end() 30call plug#end()
@@ -134,6 +144,11 @@ if exists("g:plug_home")
134 144
135 let g:airline_symbols.space = "\ua0" 145 let g:airline_symbols.space = "\ua0"
136 set laststatus=2 146 set laststatus=2
147
148 if exists('g:ycm_install_command')
149 let g:ycm_autoclose_preview_window_after_completion = 1
150 let g:ycm_autoclose_preview_window_after_insertion = 1
151 endif
137endif 152endif
138 153
139" vim: set ts=8 sw=4 tw=0 et : 154" vim: set ts=8 sw=4 tw=0 et :