类似空闲的 Ruby 交互式控制台 [英] IDLE like interactive console for Ruby
问题描述
我从 Ruby 开始,想知道是否有类似于 Python 的 IDLE 的交互式控制台,您知道,具有上下文突出显示和自动完成功能.我试过 IRB,但它相当简陋(虽然它完成了工作;毫无疑问).谷歌搜索没有帮助.大家有什么建议吗?
I'm starting out with Ruby and was wondering if there's an interactive console similar to Python's IDLE, you know, with context highlighting and autocompletion. I've tried IRB, but it's fairly spartan (although it gets the work done; no question about that). Googling hasn't helped. You guys have any suggestions?
推荐答案
有很多为 IRB 添加功能的宝石(彩色输出、更好的历史记录、格式化输出等).只需搜索 http://gemcutter.org 即可.接下来,IRB 带有制表符完成功能.以 "irb -r 'irb/completion'" 或 put
There are a lot of gems that add functionality to IRB (colored output, better history, formatted output, etc). Just search http://gemcutter.org for them. Next to that, IRB comes with tab-completion. Start it with "irb -r 'irb/completion'" or put
require 'irb/completion'
在你的~/.irbrc
这篇关于类似空闲的 Ruby 交互式控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!