-
-
Save paulopatto/9416287 to your computer and use it in GitHub Desktop.
Pryrc para usar o vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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