Vscode: Option to disable "Failed to save '...': The content on disk is newer." check

Created on 4 Jan 2019  路  5Comments  路  Source: microsoft/vscode

I would like an option to disable dirty write checking:

Failed to save 'xyz': The content on disk is newer. Please compare your version with the one on disk.

My workflow does include dirty writes and having to go through the merging is annoying.

Example: keeping dirty state in an open file then switching git branch to save and commit (that file only), then switching back to the previous branch.

feature-request file-io on-testplan workbench-editors

Most helpful comment

Pushed 2 changes to make this better:

  • a new setting files.saveConflictResolution that allows to turn off save conflict detection (this can be set on a folder level so that e.g. you can disable this selectively for network folders only)
  • a way to overwrite a file directly from the notification selectively

image

All 5 comments

I am too.

I saw this for the first time today, there is no option to "Force save anyways, because I know better than my IDE"

Screen Shot 2019-09-27 at 14 33 45

I know I can click on the [Compare] button and then click the checkmark in the diff view to save my file, but sometimes I just know I want to save without looking at a diff. The dialog should have a [Force Save] button too.

I seem to recall that VSCode used to refresh the file contents more often.

Also, if I make another edit to the file in VSCode, I'd expect that I would now "win" the race and my save would occur, but instead I'm stuck with "failed to save" errors.

Even closing and reopening VSCode doesn't affect this. I have to close the file, say "don't save", then reopen the file to be able to make edits. Feels like a design change or regression?

Pushed 2 changes to make this better:

  • a new setting files.saveConflictResolution that allows to turn off save conflict detection (this can be set on a folder level so that e.g. you can disable this selectively for network folders only)
  • a way to overwrite a file directly from the notification selectively

image

Note: setting name changed to files.saveConflictResolution and needs to be configured as overwriteFileOnDisk to disable the confirmation prompt.

Was this page helpful?
0 / 5 - 0 ratings