Permalink
Browse files

Updated rvm.vim plugin

  • Loading branch information...
1 parent 30bb866 commit c52e2e73165c5982c8fb9fe2a6083d09514a64f6 @58bits committed Jul 12, 2011
Showing with 13 additions and 10 deletions.
  1. +13 −10 vim/bundle/rvm/autoload/rvm.vim
@@ -16,16 +16,19 @@ set cpo&vim
function! rvm#statusline()
let status = ''
- if !empty($rvm_ruby_interpreter)
- let status = $rvm_ruby_interpreter.' '.$rvm_ruby_version
- elseif !empty($rvm_ruby_string)
- " If there is a default ruby $rvm_ruby_interpreter is empty, so fall back
- " to $rvm_ruby_string
- let status = $rvm_ruby_string
- endif
-
- if !empty($rvm_gemset_name)
- let status = status.'@'.$rvm_gemset_name
+ " Are we even using rvm?
+ if !empty($rvm_path)
+ if !empty($GEM_PATH)
+ let status = substitute(split($GEM_PATH, ':')[0], '.*/', '', '')
+ else
+ let status = ''
+ end
+ " I can't decide if we need this: is there ever a case where
+ " GEM_PATH is empty but RUBY_VERSION is _not_ empty?
+ "
+ " if empty(status)
+ " let status = $RUBY_VERSION
+ " endif
endif
if !empty(status)

0 comments on commit c52e2e7

Please sign in to comment.