ryu1kn / vscode-partial-diff

Visual Studio Code Extension. Take a diff of 2 parts of text(s)
https://marketplace.visualstudio.com/items?itemName=ryu1kn.partial-diff
MIT License
186 stars 16 forks source link

Ability to save diff as a `.patch` file #9

Open marshall007 opened 7 years ago

marshall007 commented 7 years ago

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 commented 7 years ago

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.

ryu1kn commented 7 years ago

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.

marmelin commented 2 years ago

I am highly interessted in this feature as well.

Jacques-Peeters commented 1 year ago

Same here