1

I have muscle memory of the vi/vim commands. So in bash, I use the vi mode, for example, I can easily go back to my command history and re-edit previous commands.

Are vi shortcuts available with pry or irb? If so, how do I set it up?

Thank you.

Zack Xu
  • 11,505
  • 9
  • 70
  • 78
  • Does this answer your question? [How do I make vi editing-mode work in IRB when using RVM?](https://stackoverflow.com/questions/6636124/how-do-i-make-vi-editing-mode-work-in-irb-when-using-rvm) – mahemoff Oct 02 '21 at 12:02

1 Answers1

1

Not sure about re-editing previous commands, but you could use interactive editor gem to start vim-like editing from inside of your irb. Using that, you can start irb, edit your script in vim and let ruby shell execute it immediately. Here is a great tutorial on this: Running Vim within IRB.

twonegatives
  • 3,400
  • 19
  • 30