I am currently doing something like this:
redir => m
silent w ! ruby
redir END
new
put=m
It executes the contents of the current buffer as Ruby code and puts the output in a new buffer.
But if the Ruby code I run is similar to
puts "start"
sleep 10
puts "end"
then I won’t see the exit for 10 seconds, then both "start" and "end" all at once.
Is there any way to stream the output to the buffer, in turn, how does it appear? So that I see the "beginning", after 10 seconds I will see the "end"? Like what happens if I just do
w ! ruby
and look at the output on the command line.
source
share