Skip to content

Instantly share code, notes, and snippets.

@murayama
Created July 8, 2013 03:30
Show Gist options
  • Save murayama/5946042 to your computer and use it in GitHub Desktop.
Save murayama/5946042 to your computer and use it in GitHub Desktop.
pryrc
# -*- coding: utf-8 -*-
# gem 'pry-rails'
# gem 'pry-debugger'
# gem 'pry-exception_explorer'
# gem 'pry-coolline'
# gem 'hirb-unicode'
begin
require 'hirb'
rescue
end
if defined? Hirb
Hirb::View.instance_eval do
def enable_output_method
@output_method = true
@old_print = Pry.config.print
Pry.config.print = proc do |output, value|
Hirb::View.view_or_page_output(value) || @old_print.call(output, value)
end
end
def disable_output_method
Pry.config.print = @old_print
@output_method = nil
end
end
Hirb.enable :output => {"ActiveRecord::Base" => {:class => :auto_table, :ancestor => true, :options => {:vertical => true}}}
end
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment