Search code examples
rubyvim

Running ruby code from vim


Is it possible after editing a ruby program in Vim to run it while still in the editor, not using the command line?


Solution

  • From Vim, you can run the current buffer with : :!ruby %

    It might be helpful or not depending on your use case.

    Similarly, you invoke any shell command by using :!command