-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpryrc
43 lines (38 loc) · 975 Bytes
/
pryrc
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
38
39
40
41
42
43
begin
require 'spirit_hands'
SpiritHands.hirb = false
rescue LoadError
# Do nothing
end
begin
require 'jazz_fingers'
if defined?(JazzFingers)
JazzFingers.configure do |config|
config.colored_prompt = true
config.amazing_print = true
config.coolline = true if defined?(PryCoolline)
end
end
rescue LoadError
# Do nothing
end
Pry.config.editor = proc { |file, line| "vim #{file}+#{line}" }
Pry.config.theme = 'pry-classic'
#
# Hit Enter to repeat last command
Pry::Commands.command(/^$/, 'repeat last command') do
_pry_.run_command Pry.history.to_a.last
end
if defined?(PryDebugger)
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
end
Pry.config.pager = false if ENV['VIM']
begin
require 'awesome_print'
Pry.config.print = proc { |output, value| output.puts value.ai }
rescue LoadError
# Do nothing
end