Created
October 12, 2010 17:23
-
-
Save trshafer/622565 to your computer and use it in GitHub Desktop.
a good looking irbrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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