Permalink
Browse files

Replace call to vim.eval/command to vim python API.

This is easier to read, and may be a bit faster.
  • Loading branch information...
Rip-Rip committed Jan 29, 2013
1 parent 8ab46da commit 3b91672df9f4dee34378917a36ebc1c97360511a
Showing with 3 additions and 3 deletions.
  1. +3 −3 plugin/libclang.py
View
@@ -86,7 +86,7 @@ def initClangComplete(clang_complete_flags, clang_compilation_database, \
# Get a tuple (fileName, fileContent) for the file opened in the current
# vim buffer. The fileContent contains the unsafed buffer content.
def getCurrentFile():
file = "\n".join(vim.eval("getline(1, '$')"))
file = "\n".join(vim.current.buffer[:])
return (vim.current.buffer.name, file)
class CodeCompleteTimer:
@@ -96,7 +96,7 @@ def __init__(self, debug, file, line, column, params):
if not debug:
return
content = vim.eval("getline('.')");
content = vim.current.line
print " "
print "libclang code completion"
print "========================"
@@ -432,7 +432,7 @@ def getCurrentCompletions(base):
global debug
debug = int(vim.eval("g:clang_debug")) == 1
sorting = vim.eval("g:clang_sort_algo")
line = int(vim.eval("line('.')"))
line, _ = vim.current.window.cursor
column = int(vim.eval("b:col"))
params = getCompileParams(vim.current.buffer.name)

0 comments on commit 3b91672

Please sign in to comment.