Since I’m writing lots of Ruby scripts lately I was tired testing them using the Command Line and MacVim.
Saving the file, go to to terminal, reuse last command $ ruby foobar.rb
to slow and boring!!!
Fortunately I found out it is possible to run Ruby Scripts inside VIM with the following 2 commands:
1 2 3 |
|
If you are lazy like me put something like this in your .vimrc and run your scripts blazingly fast (3 keystrokes)!
1
|
|
If you use RVM and want to use a specific version of your installed rubies you can go with something like this:
1
|
|
Of course this works with other scripting languages as well e.g.:
1
|
|