Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to diff dirty files to their version on disk #358

Closed
prawnsalad opened this issue Nov 20, 2015 · 6 comments
Closed

Allow to diff dirty files to their version on disk #358

prawnsalad opened this issue Nov 20, 2015 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues on-testplan
Milestone

Comments

@prawnsalad
Copy link

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.

@jrieken jrieken assigned jrieken and bpasero and unassigned jrieken Nov 20, 2015
@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Nov 20, 2015
@bpasero
Copy link
Member

bpasero commented Nov 20, 2015

I think this would make a great extension once we have support to open a diff editor.

@bpasero bpasero added the feature-request Request for new features or functionality label Nov 24, 2015
@bpasero bpasero removed their assignment Nov 24, 2015
@egamma egamma modified the milestone: Backlog Dec 10, 2015
@bpasero bpasero added the file-explorer Explorer widget issues label Dec 18, 2015
@bpasero bpasero self-assigned this Mar 30, 2016
@jithurjacob
Copy link

Any progress on this feature ?

@bpasero
Copy link
Member

bpasero commented 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

@bpasero bpasero changed the title Request: "Show unsaved changes" option in context menu "Show unsaved changes" option in context menu May 30, 2016
@hoovercj
Copy link
Member

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.

@bpasero bpasero removed the help wanted Issues identified as good community contribution opportunities label Jul 12, 2016
@bpasero bpasero changed the title "Show unsaved changes" option in context menu Allow to diff dirty files to their version on disk Jul 15, 2016
@bpasero bpasero removed their assignment Aug 17, 2016
@JohnArcher
Copy link

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 bpasero added help wanted Issues identified as good community contribution opportunities good first issue Issues identified as good for first-time contributors labels May 30, 2017
@bpasero
Copy link
Member

bpasero commented May 30, 2017

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)

Related to: #7278

@bpasero bpasero added on-testplan and removed good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities labels Jul 14, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues on-testplan
Projects
None yet
Development

No branches or pull requests

7 participants