awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.07k stars 454 forks source link

Manually activate/deactivate awesome_print in Pry? #149

Open jmuheim opened 10 years ago

jmuheim commented 10 years ago

I really like awesome_print, but sometimes it's not very useful because I'd rather want to see a lot of informations in one line so I don't have to press space over and over again.

I have awesome_print in my Rails app's Gemfile, and I know that I can load it into Pry using

Pry.config.print = proc {|output, value| Pry::Helpers::BaseHelpers.stagger_output("=> #{value.ai}", output)}

But it would be nicer to have deactivated it by default and be able to activate manually, something like pry(main)> AwesomePrint.activate!. I tried AwesomePrint.pry! but this doesn't work within an already opened session, at it seems.

jmuheim commented 10 years ago

Ah, I see, I can also use simply ap object_to_print to do this. ;-)

osbornebrook commented 9 years ago

You can avoid the "pressing space over and over again issue" (the pager) with Pry.config.pager = false