You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow to diff dirty files to their version on disk #358
Indicators showing that I have a modified open is great but I may forget what exactly has been changed before I save the file. The context menu for both or either the editor window and Working Files list could have an option to show a diff of some sort between the saved and unsaved file contents.
Reacted by David Bueno, Micha J., Jason Papakostas, Oli Laban, Chris Mark, Justas Brazauskas, Atticus White, Gulshan, Bruno Baketarić and Dawson Botsford
I briefly looked into this and have a questoin: is there an easy way to open the file as it is on the disk without the changes? Using the URI of the current editor opens a file with the unsaved changes.
I was able to use a textdocumentprovider that read the file contents from disk, but then that side didn't have text highlighting because it was a text document.
Just to give a (visual) reference for this really cool feature: Sublime Text has implemented that feature long time ago - just edit a file, right click and click "Show unsaved changes" from the context menu. Very handy feature which saves some time when you can't remember what you did exactly.
I would be open to a PR here, I think it is not a lot of work. Some pointers:
register a new text document content provider to be able to open the left hand side of the diff editor to be the file on disk (pointers: saveErrorHandler)
register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to CompareResourcesAction)
Activity
bpasero commentedon Nov 20, 2015
I think this would make a great extension once we have support to open a diff editor.
jithurjacob commentedon Apr 9, 2016
Any progress on this feature ?
bpasero commentedon Apr 9, 2016
This issue is currently assigned to the backlog. Every sprint we pick items from the backlog to plan for the current iteration. Please see https://github.com/Microsoft/vscode/wiki/Issue-Tracking#planning
[-]Request: "Show unsaved changes" option in context menu[/-][+]"Show unsaved changes" option in context menu[/+]hoovercj commentedon Jun 15, 2016
I briefly looked into this and have a questoin: is there an easy way to open the file as it is on the disk without the changes? Using the URI of the current editor opens a file with the unsaved changes.
I was able to use a textdocumentprovider that read the file contents from disk, but then that side didn't have text highlighting because it was a text document.
[-]"Show unsaved changes" option in context menu[/-][+]Allow to diff dirty files to their version on disk[/+]JohnArcher commentedon May 9, 2017
Just to give a (visual) reference for this really cool feature: Sublime Text has implemented that feature long time ago - just edit a file, right click and click "Show unsaved changes" from the context menu. Very handy feature which saves some time when you can't remember what you did exactly.
bpasero commentedon May 30, 2017
I would be open to a PR here, I think it is not a lot of work. Some pointers:
saveErrorHandler)CompareResourcesAction)Related to: #7278