Sublime Forum

Removing a file still want to be saved


When I remove a file by the SideBar menu “Remove” the file is still opened and ask me to be saved if I close it.

Now to remove a file I have to go through all these steps:

  • Remove the file by the SideBar contextual menu
  • Close my already removed file from the editor
  • Click on the “Don’t save” option in the alert that appears

This is very annoying. For example if I remove several files, and I forgot to follow the steps above, the alert message will appear in the future and I don’t know if I have to save or not this file.

Also if I remove a file and after this I use the “File > Save all” option the removed file will be saved and I will have to remove it again.



“Remove” menuitem on sidebar is added by “SideBarEnhancements” package, I’m the author of the package.

The behaviour you are requesting is not something I enjoy. I disagree with automated actions taken by the editor without my consentiment, such creating/opening/deleting /change focus/scroll things.

Since this can be easy customized via a preference I added : “close_affected_buffers_when_deleting_even_if_dirty” which is by default “False”.
You need to update to latest version, to get this working.



I don’t think is a problem of any plugin. The behavior is the same if I remove the file from the console: The file automatically disappear from the ‘SideBar’ but remains into the the ‘opened files’ as an unsaved file. So It will ask me to be saved if I close it.

This is very annoying if I’m playing with ‘git’ and going to a branch where the opened file doesn’t exists, the file doesn’t disappear from the opened files and it will ask me to be saved.