Allow to configure editor auto reload behaviour
See original GitHub issueVSCode Version: 1.10.2 OS Version: macOS 10.12.3
Steps to Reproduce:
- Open editor
- Modify a file in your git repository, but don’t save it
- Checkout a different branch that touches the same file
- Go back to the editor and try to save
- ERROR: “Failed to save ‘file1’: The content on disk is newer. Click on Compare to compare your version with the one on disk.”
Personally I would like to see the files being reload from the disk every time without prompt. With git I don’t have to worry about losing history. Similar to how SublimeText works. When the files change in disk (ex: change of branches), they get automatically reloaded, independently of their current state in the editor. I prefer this behaviour, rather than having to confirm reloads.
With that said however, there must be options for all the use cases. Many people prefer to be notified of changes in their files!
Suggestion to add an editor.autoReload
parameter in order to control this behaviour. Possible values:
Always
- reload from disk without promptConfirm
- show a prompt confirmation to either accept or discard the changesBackup
- show the file with the new changes automatically, but always backup the old state to ‘filename.bak’Never
- current behaviour?
Evolved the idea from @rmunn on #23043 issue. Decided it was best to create a separate issue for this.
EDIT: Made it clear that it is mandatory to implement this feature with all the use cases in mind, and added new options.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:52
- Comments:77 (19 by maintainers)
Top GitHub Comments
This is how Visual Studio 2017 handles files changed in the background: This is the kind of behaviour I would like to see Visual Studio Code.
Wow, looks like this feature request has fallen into a black hole. This is a shame. I really like the look and feel of VSCode, but not having it prompt me when a file is about to be updated is a deal breaker for me. Back to Notepad++ 😦