

Using vim inside irb - oscardelben
http://vimcasts.org/episodes/running-vim-within-irb

======
micheljansen
This will change my life :)

(sounds more dramatic than I mean it, but seriously: this is really going to
save me time)

------
crazydiamond
Very nice. However, should not irb take from the $EDITOR environment variable,
like several other such programs and allow editing of contents by itself,
rather than requiring another gem to be required.

I have earlier tried out other "plugins" to irb (iirc wirble to name one) ..
these usually used to slow down loading of irb, and often result in messy
outputs. So finally, i use a clean, default irb install. I'll certainly try
this out, however. Thanks.

~~~
kunley
Yeah taking from $EDITOR would be great. I use emacsclient extensively and
$EDITOR is set differently wrt to context.

As a temporary solution I have a monkey patch as shown here:
<http://github.com/jberkel/interactive_editor/issues/2>

~~~
kunley
FYI the upstream has it done already.

------
Davertron
Someone in the comments mentions Conque
(<http://www.vim.org/scripts/script.php?script_id=2771>) which makes it easy
to run other applications (mysql, irb, etc.) in a split and send text from
your current buffer to the other program. As the commenter mentions, this is
sort of the opposite of what this vimcast shows, and for some people might be
preferable.

------
tree_of_item
Is there an emacscasts? The closest I can find is
<http://www.emacswiki.org/emacs/EmacsScreencasts> which isn't as cohesive.

~~~
oscardelben
I found these with a quick search:
<http://www.emacswiki.org/emacs/EmacsScreencasts>

~~~
tree_of_item
That must have been a very quick search because that link is in my post :)

~~~
oscardelben
Lesson learned: read two times before posting if you're just awakened. Sorry
about that.

------
crazydiamond
Slightly offtopic, but I have to say I like the HN folks a lot. I find that at
reddit, vim and ruby related threads and posts get down-voted rather
senselessly. The same post on HN gets upvoted and thanked.

The "formatting with par" cast was nice too. Nice pleasant voice, too.

------
sophacles
Just a heads up for python people who are feeling jealous: ipython does this
also :)

~~~
nfnaaron
[http://ipython.scipy.org/doc/nightly/html/config/editors.htm...](http://ipython.scipy.org/doc/nightly/html/config/editors.html)

"TextMate¶

Currently, TextMate support in IPython is broken. It used to work well, but
the code has been moved to IPython.quarantine until it is updated.

vim configuration¶

Currently, vim support in IPython is broken. Like the TextMate code, the vim
support code has been moved to IPython.quarantine until it is updated."

I tried vim in ipython, it worked in a very simple test: define a function,
:wq and run the function. Was able to get back to the same edit because
ipython reports the /tmp file name after the editor returns. Dunno what's
broken.

Fallback: you can use ipython, python or anything else as the argument to
ScreenShell in vim.

<http://www.vim.org/scripts/script.php?script_id=2711>

------
ujeezy
Life-changing, thank you :)

------
korch
This is life changing. I stopped using utility belt a long time ago since it
hasn't been updated, but never heard of the interactive_editor gem.

This is the simplest way to get something in vim that resembles Slime. The
only other way of doing this I have seen is the Rube Goldberg contraption that
(ab)uses Screen, Vim buffers and pipes.

