Skip to content

Instantly share code, notes, and snippets.

@techarch
Created May 25, 2010 22:34
Show Gist options
  • Save techarch/413779 to your computer and use it in GitHub Desktop.
Save techarch/413779 to your computer and use it in GitHub Desktop.
# Prerequisites:
# 1) Install VIM
# 2) gem install interactive_editor
# -------------------------
require 'rubygems'
require 'interactive_editor'
DEFAULT_IRB_SESSION_FILE = 'my_irb_session.rb'
class InteractiveEditor
alias :original_edit :edit
def edit(file)
file = DEFAULT_IRB_SESSION_FILE if file.nil?
original_edit(file)
end
end
puts "Welcome back - saved session: #{DEFAULT_IRB_SESSION_FILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment