diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 3cc57480..1f77e050 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -54,13 +54,22 @@ elseif !has( 'timers' ) \ echohl None call s:restore_cpo() finish -elseif !has( 'python' ) && !has( 'python3' ) +elseif !has( 'python_compiled' ) && !has( 'python3_compiled' ) echohl WarningMsg | \ echomsg "YouCompleteMe unavailable: requires Vim compiled with " . \ "Python (2.7.1+ or 3.4+) support." | \ echohl None call s:restore_cpo() finish +" These calls try to load the Python 2 and Python 3 libraries when Vim is +" compiled dynamically against them. Since only one can be loaded at a time on +" some platforms, we first check if Python 3 is available. +elseif !has( 'python3' ) && !has( 'python' ) + echohl WarningMsg | + \ echomsg "YouCompleteMe unavailable: unable to load Python." | + \ echohl None + call s:restore_cpo() + finish elseif &encoding !~? 'utf-\?8' echohl WarningMsg | \ echomsg "YouCompleteMe unavailable: requires UTF-8 encoding. " .