sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

Add "Same for all" checkbox when closing unsaved tabs

Open ianrrees opened this issue 8 years ago • 8 comments

1. Explain briefly what the enhancement is and why you think it would be useful.

When I open ST, I fairly frequently am presented with a set of several tabs open, which ST thinks have edits*. In that situation, I would like to close all the tabs, without saving any of them. Currently, this requires one dialog click per open file.

It would be nice if there were a checkbox that would apply that answer to subsequent files. Eg, when I do "close all files" and have 10 tabs open and edited, on the first one I would like to indicate "Do not save any of these".

*This comes about, due to a weird NFS mounted project situation, where the file server sometimes dies and there's doesn't seem to be a clear "right way" for ST to handle the situation.

2. Provide any other necessary or useful information regarding your issue, such as (code) examples or related links.

Environment

  • Operating system and version:
    • Mac OS 10.12.6
  • Sublime Text:
    • Build 3.0 Build 3143

ianrrees avatar Dec 22 '17 23:12 ianrrees

related, but for reloading externally modified files: https://github.com/SublimeTextIssues/Core/issues/1666

keith-hall avatar Oct 04 '18 17:10 keith-hall

This is still a huge problem. I've ran find'n'replace on a temporary folder, and now I'm stuck with 2000 tabs individually asking to save changes, and the whole application has become permanently is unusable.

kornelski avatar Apr 15 '19 18:04 kornelski

@kornelski I think you can also just delete "the" session file. On a Mac, it's located at

/Users/raoulwols/Library/Application Support/Sublime Text 3/Local/Session.sublime_session

rwols avatar Apr 15 '19 18:04 rwols

This also applies to the case where one wants to save all files in a “Close All Files” action. If one forgets to do “Save All” first, the user is forced to click “Save” for all open, unsaved files which could be many after a "Replace in files" for example.

erazor-de avatar Apr 29 '19 05:04 erazor-de

@ianrrees There is "hot_exit": false, but please do read the information/warning about it in the default preferences before use.

jrappen avatar Nov 27 '19 21:11 jrappen

The implemented solution should differentiate between

  • "open" files that no longer exist on disk
  • open files that still exist on disk

devvythelopper avatar Dec 01 '21 14:12 devvythelopper

@kornelski I think you can also just delete "the" session file. On a Mac, it's located at

/Users/raoulwols/Library/Application Support/Sublime Text 3/Local/Session.sublime_session

On Linux, deleting ~/.config/sublime-text-3/Local/Session.sublime_session did the trick.

SuzanaK avatar Sep 29 '23 17:09 SuzanaK

As Keith Hall pointed out to me, there is a plugin that does this beautifully

https://packagecontrol.io/packages/Close%20All%20without%20Confirmation

tobya avatar Apr 21 '24 06:04 tobya