-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpryrc
More file actions
37 lines (33 loc) · 826 Bytes
/
pryrc
File metadata and controls
37 lines (33 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Integrate command history with irb history
Pry.config.history.file = '~/.irb_history'
# Use vim
Pry.config.editor = 'vim'
# Awesomeprint
if defined?(AwesomePrint)
begin
require 'awesome_print'
require 'awesome_print/ext/active_record'
require 'awesome_print/ext/active_support'
AwesomePrint.defaults = {
indent: 2
}
AwesomePrint.pry!
end
end
# For Rails
if defined?(Rails)
begin
require "rails/console/app"
require "rails/console/helpers"
rescue LoadError => e
require "console_app"
require "console_with_helpers"
end
end
# For debugger
if defined?(PryDebugger)
Pry.config.commands.alias_command 'c', 'continue'
Pry.config.commands.alias_command 's', 'step'
Pry.config.commands.alias_command 'n', 'next'
Pry.config.commands.alias_command 'f', 'finish'
end