Skip to content

Instantly share code, notes, and snippets.

@jgosmann
Forked from anonymous/PythonAndRopeComplete.vim
Created January 9, 2013 20:34
Show Gist options
  • Save jgosmann/4496682 to your computer and use it in GitHub Desktop.
Save jgosmann/4496682 to your computer and use it in GitHub Desktop.
function! PythonAndRopeComplete(findstart, base)
if a:findstart
let result = pythoncomplete#Complete(a:findstart, a:base)
let s:useRope = 1
if result > 0
silent! if len(pythoncomplete#Complete(0, a:base)) > 0
let s:useRope = 0
endif
endif
if s:useRope
let result = RopeOmni(a:findstart, a:base)
endif
else
if s:useRope
let result = RopeOmni(a:findstart, a:base)
else
let result = pythoncomplete#Complete(a:findstart, a:base)
endif
endif
return result
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment