Created
April 16, 2010 20:58
-
-
Save dnd/368970 to your computer and use it in GitHub Desktop.
.irbrc
This file contains hidden or 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
require 'rubygems' | |
require 'irb/ext/save-history' | |
IRB.conf[:SAVE_HISTORY] = 200 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history" | |
require 'yaml' | |
require 'ap' | |
begin | |
require 'wirble' | |
Wirble.init | |
colors = Wirble::Colorize.colors.merge({ | |
# delimiter colors | |
:comma => :white, | |
:refers => :white, | |
# container colors (hash and array) | |
:open_hash => :white, | |
:close_hash => :white, | |
:open_array => :white, | |
:close_array => :white, | |
# object colors | |
:open_object => :cyan, | |
:object_class => :purple, | |
:object_addr_prefix => :cyan, | |
:object_addr => :light_red, | |
:object_line_prefix => :cyan, | |
:object_line => :yellow, | |
:close_object => :cyan, | |
# symbol colors | |
:symbol => :blue, | |
:symbol_prefix => :blue, | |
# string colors | |
:open_string => :green, | |
:string => :green, | |
:close_string => :green, | |
# misc colors | |
:number => :blue, | |
:keyword => :blue, | |
:class => :purple, | |
:range => :white | |
}) | |
Wirble::Colorize.colors = colors | |
Wirble.colorize | |
# colorize prompt | |
IRB.conf[:PROMPT][:CUSTOM] = { | |
:PROMPT_I => Wirble::Colorize.colorize_string(">> ", :cyan), | |
:PROMPT_S => Wirble::Colorize.colorize_string(">> ", :green), | |
:PROMPT_C => "#{Wirble::Colorize.colorize_string('..' , :cyan)} ", | |
:PROMPT_N => "#{Wirble::Colorize.colorize_string('..' , :cyan)} ", | |
:RETURN => "#{Wirble::Colorize.colorize_string('→' , :light_red)} %s\n" | |
} | |
IRB.conf[:PROMPT_MODE] = :CUSTOM | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment