Hacker News new | ask | show | jobs
by mg 842 days ago
Hmm.. I guess you could write a little script (2 lines?), let's call it "vimlive" which reads from stdin, streams to a temp file and opens that temp file in vim.

Then with:

    command | vimlive
You get vim with the current state of the data and you can update it with :e
1 comments

You can have vim constantly refresh a buffer if it's modified externally, like this turns your buffer into a kinda-sorta-version of `tail -f`:

    :set autoread | au CursorHold * checktime | call feedkeys("G")
So if it's already a file, just open it with vim; if it's a STDOUT/STDERR stream, redirect/`tee` to a file and open that.