run-in-terminal icon indicating copy to clipboard operation
run-in-terminal copied to clipboard

[enhancement] pipe the stdout of the command that was run back into the document after the line the cursor is on

Open JC1738 opened this issue 6 years ago • 2 comments

Great extension. Thank you for developing.

One nice ability (feature) would be to pipe the stdout of the command that was run back into the document after the line the cursor is on.

The use case for this is there are many golang command line items that take a file and line number that does things like generate code to fill a struct or implement an interface and that code is just piped to stdout. The cool thing would be to inject that response straight into the edited document. That way you don't have to create your own VS code extension would just be able to use this for some many various commands. @kortina

JC1738 avatar Jan 24 '18 23:01 JC1738

Ya, I think the challenge with that is specifying how it gets injected back into the document. Does it append at the current position, replace the entire document, etc?

It's probably worth looking into how vim does this / what options it provides.

I probably won't add terribly soon, but if you are interested and want to lay out in more detail how it might work, if it looks like there is a sensible strategy, I'm open to merging into master / potentially working on this at some point in the future when I have more time.

On Wed, Jan 31, 2018 at 5:36 PM, Jim Castillo [email protected] wrote:

Great extension. Thank you for developing.

One nice ability (feature) would be to pipe the stdout of the command that was run back into the document after the line the cursor is on.

The use case for this is there are many golang command line items that take a file and line number that does things like generate code to fill a struct or implement an interface and that code is just piped to stdout. The cool thing would be to inject that response straight into the edited document. That way you don't have to create your own VS code extension would just be able to use this for some many various commands. @kortina https://github.com/kortina

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kortina/run-in-terminal/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAXJJSLuxTaT_YxDFA8uudS_U5_5O4oks5tQRUVgaJpZM4RsF7U .

-- kortina kortina.nyc/essays

kortina avatar Feb 01 '18 01:02 kortina

I agree with this feature, +1 btw, great work mate, I prefer this ext compare to others, as of this writing I'm not sure if vscode does expose the a custom cmd like this in keybindings.

jptcnde avatar Apr 01 '18 06:04 jptcnde