How can I evaluate Ruby code on-the-fly when you are writing it?
This is what it looks like:
5 + 5 # => 10
If you want to evaluate a single line you can do this with a macro simply :
qq$hy:r! ruby -e '<C-r>"'<CR>
qq " record a new macro v$hy " select the current line minus the ^m :r! " prepare to read a command ruby -e '<C-r>"' " call ruby inline mode executing <CR> " execute the whole thing
You now have the result on the new line, feel free to customize :)