diff --git a/lib/rib/more/edit.rb b/lib/rib/more/edit.rb
index <HASH>..<HASH> 100644
--- a/lib/rib/more/edit.rb
+++ b/lib/rib/more/edit.rb
@@ -13,9 +13,10 @@ module Rib::Edit
       file.puts(Rib.vars[:edit])
       file.close
 
-      system("#{ENV['EDITOR']} #{file.path}")
+      shell = Rib.shell
+      system("#{shell.editor} #{file.path}")
 
-      if (shell = Rib.shell).running?
+      if shell.running?
         shell.send(:multiline_buffer).pop
       else
         shell.before_loop
@@ -29,5 +30,9 @@ module Rib::Edit
     end
   end
 
+  def editor
+    ENV['EDITOR'] || 'vim'
+  end
+
   Rib.extend(Imp)
 end
[rib/more/edit] default editor to vim, and you could override it