4 ms·
Using vim inside irb
- tree_of_item 16y agoIs there an emacscasts? The closest I can find is http://www.emacswiki.org/emacs/EmacsScreencasts http://www.emacswiki.org/emacs/EmacsScreencasts which isn't as cohesive.
- oscardelben 16y agoI found these with a quick search: http://www.emacswiki.org/emacs/EmacsScreencasts http://www.emacswiki.org/emacs/EmacsScreencasts
- tree_of_item 16y agoThat must have been a very quick search because that link is in my post :)
- oscardelben 16y agoLesson learned: read two times before posting if you're just awakened. Sorry about that.
- pook 16y agohttp://stackoverflow.com/questions/140336/where-can-i-find-a-video-of-a-professional-using-emacs http://stackoverflow.com/questions/140336/where-can-i-find-a... has a few, but mostly duplicates of emacswiki's.
- crazydiamond 16y agoVery 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 16y agoYeah 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 http://github.com/jberkel/interactive_editor/issues/2
- kunley 16y agoFYI the upstream has it done already.
- crazydiamond 16y agoSlightly 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.
- ujeezy 16y agoLife-changing, thank you :)
- micheljansen 16y agoThis will change my life :) (sounds more dramatic than I mean it, but seriously: this is really going to save me time)
- korch 16y agoThis 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.
- sophacles 16y agoJust a heads up for python people who are feeling jealous: ipython does this also :)
- nfnaaron 16y agohttp://ipython.scipy.org/doc/nightly/html/config/editors.html http://ipython.scipy.org/doc/nightly/html/config/editors.htm... "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 http://www.vim.org/scripts/script.php?script_id=2711
- Davertron 16y agoSomeone in the comments mentions Conque (http://www.vim.org/scripts/script.php?script_id=2771 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.