vscode-partial-diff icon indicating copy to clipboard operation
vscode-partial-diff copied to clipboard

Ability to save diff as a `.patch` file

Open marshall007 opened this issue 8 years ago • 4 comments

When viewing the diff for a selection against your clipboard contents, it appears that it is not possible to copy or save the actual diff content from the rendered view. I would like to be able to save or copy out the diff in the standard .patch format.

Bonus points if we also had a command to apply a patch from your clipboard to a selection to bring the above functionality full-circle.

marshall007 avatar Aug 04 '17 19:08 marshall007

This may be a more general VSCode feature request since this plugin appears to defer to the built-in diff previewing functionality, but I wasn't totally sure.

marshall007 avatar Aug 04 '17 19:08 marshall007

It's actually an interesting suggestion 🙂 And yes, you can copy out the text contents in the diff view but you cannot copy out the diff information.

It could be a tricky on partial diff though, as it would be taking only certain part of your text; so line number or column number in the patch need to be adjusted with the context of whole files.

ryu1kn avatar Aug 05 '17 01:08 ryu1kn

I am highly interessted in this feature as well.

marmelin avatar Feb 14 '22 14:02 marmelin

Same here

Jacques-Peeters avatar Sep 12 '23 12:09 Jacques-Peeters