Skip to content

Instantly share code, notes, and snippets.

@trshafer
Created October 12, 2010 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trshafer/622565 to your computer and use it in GitHub Desktop.
Save trshafer/622565 to your computer and use it in GitHub Desktop.
a good looking irbrc
# load libraries
require 'rubygems'
require 'wirble'
# so I can use awesome print (syntax: ap object) for sane object printing:
require 'ap'
require 'irb/completion'
require 'map_by_method'
require 'what_methods'
require 'pp'
IRB.conf[:AUTO_INDENT]=true
IRB.conf[:PROMPT_MODE] = :SIMPLE
# :nothing :green :light_purple
# :black :light_blue :purple
# :blue :light_cyan :red
# :brown :light_gray :white
# :cyan :light_green :yellow
# :dark_gray :light_red
# start wirble (with color)
Wirble.init
colors = Wirble::Colorize.colors.merge(
# delimiter colors
:comma => :blue,
:refers => :blue,
# container colors (hash and array)
:open_hash => :green,
:close_hash => :green,
:open_array => :green,
:close_array => :green,
# object colors
:open_object => :light_red,
:object_class => :white,
:object_addr_prefix => :blue,
:object_line_prefix => :blue,
:close_object => :light_red,
# symbol colors
:symbol => :yellow,
:symbol_prefix => :yellow,
# string colors
:open_string => :red,
:string => :cyan,
:close_string => :red,
# misc colors
:number => :cyan,
:keyword => :green,
:class => :light_green,
:range => :red
)
Wirble::Colorize.colors = colors
Wirble.colorize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment