I often insert binding.pry
to my ruby files when I debug them. As I use Vim I\'d love to automate it to avoid retyping it every time. How could I do it?
Th
You can define a shortcut for this purpose with the following key strokes
Explaination
Now, while you in normal mode, the keystrokes (one key after each other) will insert 'binding.pry' in a new line under the current line.
Explaination for step 3: nnoremap is the command for mapping keystroke(s) to do some action. 'bi' is the keystroke combination. You can adjust this to your needs. And the rest is a normal edit sequenz on VIM: