diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 103c6d28..deb3248b 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -65,19 +65,19 @@ function! youcompleteme#Enable() py import vim exe 'python sys.path = sys.path + ["' . s:script_folder_path . '/../python"]' py import ycm - py csystem = ycm.CompletionSystem() + py identcomp = ycm.IdentifierCompleter() py clangcomp = ycm.ClangCompleter() endfunction function! s:OnBufferVisit() call s:SetCompleteFunc() - py csystem.AddBufferIdentifiers() + py identcomp.AddBufferIdentifiers() endfunction function! s:OnCursorHold() - py csystem.AddBufferIdentifiers() + py identcomp.AddBufferIdentifiers() endfunction @@ -106,7 +106,7 @@ function! s:AddIdentifierIfNeeded() if should_add_identifier != 1 return endif - py csystem.AddPreviousIdentifier() + py identcomp.AddPreviousIdentifier() endfunction @@ -161,12 +161,12 @@ function! s:IdentifierCompletion(query) return [] endif - py csystem.CandidatesForQueryAsync( vim.eval('a:query') ) + py identcomp.CandidatesForQueryAsync( vim.eval('a:query') ) let l:results_ready = 0 while !l:results_ready py << EOF -results_ready = csystem.AsyncCandidateRequestReady() +results_ready = identcomp.AsyncCandidateRequestReady() if results_ready: vim.command( 'let l:results_ready = 1' ) EOF @@ -177,7 +177,7 @@ EOF let l:results = [] py << EOF -results = csystem.CandidatesFromStoredRequest() +results = identcomp.CandidatesFromStoredRequest() if results: vim.command( 'let l:results = ' + str( results ) ) EOF diff --git a/python/ycm.py b/python/ycm.py index d0dc45d7..4b46d42f 100644 --- a/python/ycm.py +++ b/python/ycm.py @@ -25,7 +25,7 @@ min_num_chars = int( vim.eval( "g:ycm_min_num_of_chars_for_completion" ) ) clang_filetypes = set( [ 'c', 'cpp', 'objc', 'objcpp' ] ) -class CompletionSystem( object ): +class IdentifierCompleter( object ): def __init__( self ): self.completer = indexer.IdentifierCompleter() self.completer.EnableThreading()