Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Merge pull request #15 from chinghanho/master

Added support for SublimeText.app (subl) CLI interface
latest commit b56d32184f
Jan Berkel authored
Octocat-spinner-32 lib Open Sublime Text in a new window. March 20, 2013
Octocat-spinner-32 .gitignore initial commit May 16, 2010
Octocat-spinner-32 LICENSE add missing license stuff April 14, 2011
Octocat-spinner-32 README.md README September 06, 2011
Octocat-spinner-32 Rakefile Link to TechRepublic article April 26, 2011
Octocat-spinner-32 interactive_editor.gemspec Release 0.0.10 September 07, 2011
README.md

Interactive editor

Drew Neil has made it the subject of one of his vimcasts: vimcasts #20: running Vim within IRB, and Chad Perrin has written an article about it on TechRepublic: Use interactive_editor with irb for an inside-out Ruby IDE. There's also an outdated blog post which predates the gem from 2009: Integrating vim and 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)

Bonus: editing of objects on the fly (inspired by _why's object aorta)

$ irb
> { 'chunky' => 'bacon' }.vi

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 alternatives ripl and pry.

Credits

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

With contributions from:

Something went wrong with that request. Please try again.