C-x C-e to invoke an editor on the current pry (or irb) line
Tim Pope
gem "pry-editline", "~> 1.1.1"