my favorite

2010/02/27

irb auto complete with syntax highlight

step 1 : create a .irbrc file in your home directory

require 'rubygems'
require 'wirble'

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

Wirble.init
Wirble.colorize


step 2 : install wirble gem
sudo gem install wirble

try your irb now :)

No comments:

BIO

Taipei, GuTing, Taiwan

huang47 | personal

huang47 | personal