I have 2k opened files, do I have to close them all manually, 2 thousand times? no.
I would like a way to apply the action to all files, all tabs etc.
It’s absurd a silly feature like this has never been added.
"Apply to all" feature when mass closing files or tabs
Amount of such dialogs could be reduced by chaining existing commands to
- close all deleted files without asking to save them.
- save all views - displaying “Save As…” dialog only for not yet saved scratch views
- close all unmodified files
The following key binding calls those 3 commands for the active group.
{
"keys": ["ctrl++shift+f4"],
"command": "chain",
"args": {
"commands": [
{"command": "close_deleted_files", "args": {"group": -1} },
{"command": "save_all", "args": {"group": -1} },
{"command": "close_unmodified", "args": {"group": -1} },
]
},
},
I cant code nor i understand it.
I just want a little UI checkbox “apply to all”. Yes i know there is a plugin, but no. I want it in the main program.
Well, if not even adding a custom key binding is too much, …
A window may contain various different views:
- unmodified files
- modified files
- views of files which do no longer exist
- scratch views, which have never been saved
There’s no common or general strategy to close all without bothering you, which could be enabled via checkbox without risking unexpected closing of unsaved files and loosing their content.
With ST being a highly customizable editor it is also common practice to not implement features in core, which can be handled by customized simple key bindings or plugins.
I agree current default strategy being far from optimal, especially as they don’t even try to save/close all files first, which could do so without user interaction, followed by tasks requireing one.
Community can just provide hints to work arround it by using APIs or commands, available.