Open Konfekt opened 6 months ago
Does this plug-in fill the gap?
I don't know to be honest. The idea is to run shell command, have the output in a dedicated buffer, be able to navigate results if possible.
Thank you, this sounds great. Since it runs in the background and outputs into a buffer, this is already more convenient than having to wait for the output:
:Sh {command}
Start {command} in background, open existing [shout] buffer or create a new one and print output of stdout and stderr there. Put cursor to the end of buffer.
Would you consider writing to the same (or indicated) buffer to a given range (like :<range> command
) or a line (like :<count>read! command
) ?
Of course, this buffer better be left for the time being to avoid having to handle user input sensibly.
Of course, this buffer better be left for the time being to avoid having to handle user input sensibly.
While I can see this is possible to do, I don't want to do it in this plugin. At least now :)
I can hardly see how smooth user interaction is possible (as it could jump forth and back with the income of stdout data). But as long as its output goes to a buffer without user interaction (in a different window or tab), then it works as at the moment, with the sole difference of specifying the output buffer and range instead of using the dedicated buffer (and output range starting at the first line!?)
can hardly see how smooth user interaction is possible
I wouldn't call it smooth, indeed. I can see 2 possibiliteis:
Yes, we can go with 1 which has many advantages from the developer's side and is already a lot better than being stuck in the buffer without being able to interact.
Note that :<range>command
not only replaces the range, but also reads it.
It seems that this is the first plug-in to send output to an editable buffer. I am a bit overwhelmed by the variety of REPL plug-ins, such as https://github.com/rhysd/reply.vim, https://github.com/metakirby5/codi.vim and https://github.com/jpalardy/vim-slime, but they all send to an unmodifiable vim terminal buffer, which seems to be the same as :FloatermSend.
I just wanted something like :new | !r command
but with "stable" scratch like buffer behind it.
While there are some plug-ins (such as https://github.com/mg979/tasks.vim/ or https://github.com/tpope/vim-dispatch) that replace
:make
by an async command, few that do these for the commands that write to a buffer such as:<range>!command
or:read! command
(which is more intricate regarding possible user interaction that should go elsewhere). Does this plug-in fill the gap?