Check for python on plugin init

This commit is contained in:
Strahinja Val Markovic 2012-08-02 20:38:15 -07:00
parent 287d01c8b3
commit 2888cbf5c8

View File

@ -17,13 +17,18 @@
if exists( "g:loaded_youcompleteme" ) if exists( "g:loaded_youcompleteme" )
finish finish
" TODO: check for python too
elseif v:version < 703 || !has( 'patch584' ) elseif v:version < 703 || !has( 'patch584' )
echohl WarningMsg | echohl WarningMsg |
\ echomsg "YouCompleteMe unavailable: requires Vim 7.3.584+" | \ echomsg "YouCompleteMe unavailable: requires Vim 7.3.584+" |
\ echohl None \ echohl None
finish finish
elseif !has( 'python' )
echohl WarningMsg |
\ echomsg "YouCompleteMe unavailable: requires python 2.x" |
\ echohl None
finish
endif endif
let g:loaded_youcompleteme = 1 let g:loaded_youcompleteme = 1
let g:ycm_min_num_of_chars_for_completion = let g:ycm_min_num_of_chars_for_completion =