Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
Tree: 05df80c217

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
Rakefile
interactive_editor.gemspec

README.md

Interactive editor

cf. my (slightly outdated) blog post: Integrating vim and irb and vimcasts #20: Running Vim within IRB.

Usage

$ gem install interactive_editor

Put the following in your .irbrc:

require 'rubygems'
require 'interactive_editor'

Then, from within irb:

$ irb                        # or ripl
> vi                         # (use vi w/ temp file)
> vi 'filename.rb'           # (open filename.rb in vi)
> ed                         # (use EDITOR env variable)
> [emacs|vim|mvim|nano|mate] # (other editors)

To try it out without installing the gem:

$ git clone git://github.com/jberkel/interactive_editor.git
$ cd interactive_editor
$ rake console

interactive_editor also works with the IRB alternative ripl.

Credits

Giles Bowkett, Greg Brown, and several audience members from Giles' Ruby East presentation: Use vi or any text editor from within IRB.

Something went wrong with that request. Please try again.