Clear error message on ycm_core ImportError

This commit is contained in:
Strahinja Val Markovic 2013-01-26 17:29:18 -08:00
parent 1f923b55d7
commit a6a1e7c949
2 changed files with 12 additions and 3 deletions

View File

@ -55,9 +55,8 @@ def NumLinesInBuffer( buffer ):
def PostVimMessage( message ):
# TODO: escape the message string before formating it
vim.command( 'echohl WarningMsg | echomsg "{0}" | echohl None'
.format( message ) )
.format( message.replace( '"', '\\"' ) ) )
def EchoText( text ):

View File

@ -23,9 +23,19 @@ import vim
import utils
import os
import sys
try:
import ycm_core
except ImportError, e:
vimsupport.PostVimMessage(
'Error importing ycm_core. Are you sure you have placed a version 3.2+ '
'libclang.[so|dll|dylib] in folder "{0}"? See the Installation Guide in '
'the docs. Full error: {1}'.format(
os.path.dirname( os.path.abspath( __file__ ) ), str( e ) ) )
from completers.all.identifier_completer import IdentifierCompleter
FILETYPE_SPECIFIC_COMPLETION_TO_DISABLE = vim.eval(
'g:ycm_filetype_specific_completion_to_disable' )