vscode-edit-with-shell icon indicating copy to clipboard operation
vscode-edit-with-shell copied to clipboard

request: output to temporary file

Open stessaris opened this issue 5 years ago • 3 comments

Would it be possible to add a command that creates a new temporary file with the output instead of replacing the selection/entire file? Something like Filter Text vs Filter Text Inplace of the FilterText extension.

stessaris avatar May 15 '20 11:05 stessaris

Hi @stessaris sorry for my late reply and thanks for the suggestion. Sounds good. Do you want to provide a use case you have in your mind?

ryu1kn avatar May 30 '20 12:05 ryu1kn

Often I find myself converting or filtering data by chaining commands with pipes, e.g. using jq with JSON or awk. Sometimes the whole file, other times just a part of it. In these cases I don't want to replace the original text but to generate a new file. Right now I do it by copying the text and using the terminal window with pbpaste | filter | code -, but it's less than ideal since requires a lot of irrelevant typing and the the generated temporary file blocks the terminal until saved.

stessaris avatar Jun 01 '20 13:06 stessaris

Cool thanks for the additional context. I also sometimes want to do text processing without modifying the original text; I copy the text into a new tab then run this plugin to process, probably the similar operational cost. If the processed bit automatically populated into a tab, it would be it's one less step 👍

ryu1kn avatar Jun 02 '20 10:06 ryu1kn