diff options
| author | 2017-02-08 17:14:01 +0100 | |
|---|---|---|
| committer | 2017-02-08 17:14:01 +0100 | |
| commit | a4ce31d3ecd6285878a9d226ef81c1c0db2ce39a (patch) | |
| tree | f43e76530831b128549e2c9cfe6952e3ef2557ea | |
| parent | 0a995f4892dca7018ebbf2ec85a8bbc5065ff81d (diff) | |
| download | dotfiles-a4ce31d3ecd6285878a9d226ef81c1c0db2ce39a.tar.gz dotfiles-a4ce31d3ecd6285878a9d226ef81c1c0db2ce39a.tar.bz2 dotfiles-a4ce31d3ecd6285878a9d226ef81c1c0db2ce39a.zip | |
Added conditional YCM options
| -rwxr-xr-x | vim/.vim/vimrc | 17 |
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' | |||
| 14 | Plug 'vim-airline/vim-airline-themes' | 14 | Plug 'vim-airline/vim-airline-themes' |
| 15 | 15 | ||
| 16 | if has('python') || has('python3') | 16 | if 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} | ||
| 18 | endif | 28 | endif |
| 19 | 29 | ||
| 20 | call plug#end() | 30 | call 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 | ||
| 137 | endif | 152 | endif |
| 138 | 153 | ||
| 139 | " vim: set ts=8 sw=4 tw=0 et : | 154 | " vim: set ts=8 sw=4 tw=0 et : |
