fabiospampinato / vscode-diff

Diff 2 opened files with ease. Because running `code --diff path1 path2` is too slow.
MIT License
40 stars 9 forks source link

Diffing unsaved files #14

Closed radiocity closed 7 months ago

radiocity commented 3 years ago

VSCode version: 1.52.1 Diff version: v1.4.0 OS: Windows 10 Pro 2004

Have two large sql files opened from desktop folder. No project opened. You cannot diff an unsaved file message popups everytime I try to diff :C

Console:

You cannot diff an unsaved file
onDidChangeNotification @ notificationsAlerts.ts:36
fharper commented 3 years ago

I would also love to be able to diff unsaved files.

fabiospampinato commented 3 years ago

That's not really possible, but the app could save a temporary file for you and diff against that. That'd be kind of a read-only thing though as editing the temporary file would be pointless.

Would you guys like to see that? 🤔

fharper commented 3 years ago

Yep, even if we can't modify, that would give us at least the possibility to compare them.

tupaschoal commented 3 years ago

I'd love seeing that too.

Rabadash8820 commented 3 years ago

@fabiospampinato Any update on this? I too would like to be able to diff unsaved files. Tbh, I don't plan to use this extension unless I'm working with unsaved files. If I had a saved file, then I would probably be working in one of my git repos and thus use git diff or a full-fledged compare tool like GitKraken for diffing. So a readonly "snapshot" is fine, because I don't plan to edit the text after diffing; i.e., the main value of an extension like this is the ability to diff ad hoc text.

fabiospampinato commented 7 months ago

Support for diffing against untitled files is implemented in v2.