Skip to content

Instantly share code, notes, and snippets.

@tsukkee
Created March 13, 2010 08:07
Show Gist options
  • Select an option

  • Save tsukkee/331199 to your computer and use it in GitHub Desktop.

Select an option

Save tsukkee/331199 to your computer and use it in GitHub Desktop.
diff --git a/vim/autoload/ref/refe.vim b/vim/autoload/ref/refe.vim
index 1daaada..fba0b2f 100755
--- a/vim/autoload/ref/refe.vim
+++ b/vim/autoload/ref/refe.vim
@@ -50,7 +50,9 @@ endfunction
function! ref#refe#complete(query) " {{{2
- return split(system(g:ref_refe_cmd . ' -l -s ' . a:query), "\n")
+ let refe_version = matchstr(system(g:ref_refe_cmd . ' --version'), '[0-9.]\+')
+ let option = (refe_version == 2 ? ' -l ' : ' -l -s ')
+ return split(system(g:ref_refe_cmd . option . a:query), "\n")
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment