Skip to content

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

Closed

Description

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.

Activity

  1. added
    help wanted
    on Nov 20, 2015
  2. bpasero commented on Nov 20, 2015

    @bpasero
    Contributor

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

  3. added
    feature-request
    on Nov 24, 2015
  4. jithurjacob commented on Apr 9, 2016

    @jithurjacob

    Any progress on this feature ?

  5. bpasero commented on Apr 9, 2016

    @bpasero
    Contributor

    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

  6. changed the title [-]Request: "Show unsaved changes" option in context menu[/-] [+]"Show unsaved changes" option in context menu[/+] on May 30, 2016
  7. hoovercj commented on Jun 15, 2016

    @hoovercj
    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.

  8. removed
    help wanted
    on Jul 12, 2016
  9. changed the title [-]"Show unsaved changes" option in context menu[/-] [+]Allow to diff dirty files to their version on disk[/+] on Jul 15, 2016
  10. JohnArcher commented on May 9, 2017

    @JohnArcher

    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.

  11. added
    help wanted
    good first issue
    on May 30, 2017
  12. bpasero commented on May 30, 2017

    @bpasero
    Contributor

    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

  13. added and removed
    good first issue
    help wanted
    on Jul 14, 2017
  14. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestfile-exploreron-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions