使IRB语法高亮方法的办法

1.安装wirble

gem install wirble

2.添加或者修改~/.irbrc文件

require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = [] unless IRB.conf.key?(:LOAD_MODULES)
unless IRB.conf[:LOAD_MODULES].include?('irb/completion')
IRB.conf[:LOAD_MODULES] << 'irb/completion'
end


你可能感兴趣的:(使IRB语法高亮方法的办法)