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

Close dirty editors: Provide fast action to save all or revert all #8009

Closed
sandy081 opened this issue Jun 22, 2016 · 15 comments
Closed

Close dirty editors: Provide fast action to save all or revert all #8009

sandy081 opened this issue Jun 22, 2016 · 15 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded workbench-hot-exit Preservation of unsaved changes across restarts workbench-tabs VS Code editor tab issues
Milestone

Comments

@sandy081
Copy link
Member

  • VSCode Version: Latest insiders
  • OS Version: OS X

Steps to Reproduce:

  1. I have quite number of dirty files in the editor (say > 10)
  2. When I use Close All action, I am getting a confirmation dialog for each file. Instead, I should be able to close all files at once with/without applying edits.
@dbaeumer dbaeumer added workbench feature-request Request for new features or functionality labels Jun 22, 2016
@bpasero bpasero added the workbench-tabs VS Code editor tab issues label Jun 23, 2016
@bpasero bpasero modified the milestones: Backlog, June 2016 Jun 23, 2016
@bpasero bpasero changed the title Editor Close all action should have an option to close all dirty editors once Close dirty editors: Provide fast action to save all or revert all Jun 27, 2016
@bpasero
Copy link
Member

bpasero commented Jun 27, 2016

Not trivial with our current model of handling dirty editors.

@bpasero bpasero removed their assignment Aug 17, 2016
@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Oct 4, 2016
@bpasero bpasero added workbench-hot-exit Preservation of unsaved changes across restarts verification-needed Verification of issue is requested labels Dec 8, 2016
@bpasero bpasero modified the milestones: January 2017, Backlog Dec 13, 2016
@bpasero bpasero self-assigned this Dec 13, 2016
@bpasero
Copy link
Member

bpasero commented Dec 13, 2016

@sandy081 @alexandrudima ping, since you reported this and similar issue. I decided to change the way our "Close All Editors" action work and instead of asking for individual files to confirm saving, show the combined confirmation dialog (the same you get on shutdown without hot exit enabled).

image

I am not 100% sure this is the best fix because some people might expect our current behaviour and would want a separate action for it. Though I find it elegant to show the combined confirmation when you actually invoke the "Close All Editors" action.

Note that this does not change the behaviour of the "Close All Editors in Group" action, nor the other close related actions (e.g. "Close Others").

/cc @Tyriar since this is for a better hot exit experience

@Tyriar
Copy link
Member

Tyriar commented Dec 13, 2016

I like it, if people need to discard some at this point they can cancel and discard.

@bpasero
Copy link
Member

bpasero commented Jan 23, 2017

  • To verify:
    Invoking the "Close All Editors" command shows you a prompt for any dirty file that can quickly be used to dismiss or save all dirty.

@Tyriar
Copy link
Member

Tyriar commented Jan 25, 2017

Works great 👍

@bpasero the message box may look better if the list of files is in the description part of the message box rather than the title?

@Tyriar Tyriar added the verified Verification succeeded label Jan 25, 2017
@bpasero
Copy link
Member

bpasero commented Jan 26, 2017

Yeah good point, I can look into that. Might only have a visual difference on macOS though.

@xconverge
Copy link
Contributor

Unfortunately this still doesn't fix the desired use for the vim plugin

q! should quit no matter what is dirty or not dirty

Do you have any reccomendations for this?

@xconverge
Copy link
Contributor

@bpasero Any ideas on how I can do this and skip the prompt entirely?

@bpasero
Copy link
Member

bpasero commented Feb 26, 2017

@xconverge that should work as long as hot exit is enabled in settings

@xconverge
Copy link
Contributor

But I want the feature of hotexit + revert all changes so that's why I don't think hot exit is the solution.

In vim q! Is quit no matter what, if documents aren't saved then they are reverted and closed automatically

@bpasero
Copy link
Member

bpasero commented Feb 27, 2017

@xconverge I see, you want a command that quits the application after reverting all dirty changes?

@xconverge
Copy link
Contributor

Yes and quits silently. In vim you can do quit and have it prompt you to save dirty editors OR you can do a force quit which just closes everything silently and does not remember any of the unsaved changes at all.

@bpasero
Copy link
Member

bpasero commented Feb 27, 2017

@xconverge ok this sounds like a new feature request that should get a separate issue, can you create one with a good description?

@xconverge
Copy link
Contributor

Sure, this was the issue that was referenced before you guys implemented hotexit, you can see the VSCodeVim ticket referenced in October up above. I can create a new ticket though

@bpasero
Copy link
Member

bpasero commented Feb 27, 2017

It seems to me this issue has nothing to do with the VIM use case (hence all my questions).

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 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 help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded workbench-hot-exit Preservation of unsaved changes across restarts workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

5 participants