microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.42k stars 28.95k forks source link

Allow "Discard & Reload from Disk" when attempting to overwrite newer version from file #172763

Closed Nearoo closed 1 year ago

Nearoo commented 1 year ago

When an editor is "dirty" of a file that changed on disk, saving that file causes the following dialogue to open:

image

Examples where this might be useful:

Intuitively I'd expect that use case to be a rare occurance, but in my personal case, it seems to be more often the case that I'd like to discard changes than overwrite them. An argument for that fact is: What's a situation when the file changes while it's open in the editor, really? Probably more often than something I outlined above than not...

bpasero commented 1 year ago

There is also a setting for this: files.saveConflictResolution to entirely disable this check if it becomes annoying. But it does the opposite of what is asked here.

image

vscodenpa commented 1 year ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa commented 1 year ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa commented 1 year ago

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!