Skip to content

Instantly share code, notes, and snippets.

@paulopatto
Forked from dlisboa/gist:9416144
Last active August 29, 2015 13:57
Show Gist options
  • Save paulopatto/9416287 to your computer and use it in GitHub Desktop.
Save paulopatto/9416287 to your computer and use it in GitHub Desktop.
Pryrc para usar o vim
require 'irb/completion'
def vi
require 'tempfile' unless defined? Tempfile
@f ||= Tempfile.new('irb-interactive')
system('vim', @f.path)
Object.class_eval File.read(@f.path) if $?.success?
end
at_exit do
puts @f.path
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment