Close All without Confirmation
Instantly close all files (unsaved and saved) without repetitive confirmation dialogs! ⚡️
Details
Installs
- Total 2K
- Win 438
- Mac 974
- Linux 170
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 2 | 0 | 0 | 2 | 2 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
Mac | 0 | 4 | 1 | 2 | 4 | 3 | 0 | 1 | 0 | 2 | 2 | 2 | 0 | 2 | 1 | 3 | 3 | 3 | 3 | 3 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 5 | 2 | 0 | 0 | 3 | 1 | 1 | 0 | 2 | 4 | 2 |
Linux | 0 | 2 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
Readme
- Source
- raw.githubusercontent.com
Close All without Confirmation
Effortlessly close all (unsaved and saved) files in Sublime Text without being repeatedly interrupted by confirmation dialogs! This plugin is perfect for those who want to swiftly close multiple unsaved files without needing to confirm each one individually.
Features
- Close all files without confirmation dialogs.
- Option to close files only in the currently active window, perfect for those working with multiple projects.
- Accessible via the Command Palette.
- Easy-to-activate key bindings (instructions provided).
- For cautious users: By default, “Close All without Confirmation” shows you a prompt before closing all files. However, you can disable this prompt in the settings to let the plugin truly live up to its name.
Installation
Via Package Control
- Make sure you have Package Control installed.
- Open the command palette by pressing
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(macOS). - Type
Package Control: Install Package
and press Enter. - Search for
Close All without Confirmation
and select it from the list to install.
Manual Installation
- Download or clone this repository:
https://github.com/ddbln/CloseAllNoConfirm
- Open Sublime Text and click on
Preferences > Browse Packages...
orSettings > Browse Packages...
to open the packages directory. - Copy the entire
Close All without Confirmation
folder into the packages directory.
Usage
When you trigger the Close All without Confirmation
command using the Command Palette or your custom key binding, you will see a quick panel with two options: “Close all files in all windows” and “Close all files in active window only”. You can use the arrow keys to select your desired option and press Enter to confirm.
Command Palette
You can trigger the Close All without Confirmation
command using the Command Palette. Press Shift+Command+P
(Mac) or Shift+Ctrl+P
(Windows/Linux) to open the Command Palette, then type “Close All without Confirmation” (Sublime Text autocompletes) and press Enter.
Key Bindings
By default, “Close All without Confirmation” does not add key bindings. However, you can easily set up custom key bindings by following these steps:
- In Sublime Text, go to
Preferences
>Package Settings
>Close all without Confirmation
>Key Bindings - Default
. This will open the default key bindings file for the plugin. - Copy the key binding for your platform (Windows, Linux, or macOS) from the default key bindings file.
- Go to
Preferences
>Package Settings
>Close all without Confirmation
>Key Bindings - User
to open your user-specific key bindings file. - Paste the key binding you copied from the default key bindings file into your user key bindings file.
- Make sure to remove the “//” at the beginning of the lines to uncomment the key binding, then save the file.
The key binding should now be enabled and ready to use.
Suggested Key Bindings
For macOS you could use e. g. the following suggested key binding:
[
{
"keys": ["super+alt+shift+w"],
"command": "close_all_without_confirm"
}
]
A suggestion for Windows and Linux platforms:
[
{
"keys": ["ctrl+alt+shift+w"],
"command": "close_all_without_confirm"
}
]
Customization
Disabling the Confirmation Prompt
The plugin offers a customization option that allows you to toggle whether you want a single confirmation prompt before closing all files. By default, the plugin will ask you once, and you can then choose if you want to close all files in all windows or just the current one, or cancel.
However, you can easily change this setting to close all files in all windows without any prompt by setting the following options in your User settings:
{
"ask_before_closing": false,
"close_only_active_window": false
}
In case you want to only close the active windows' files you can set close_only_active_window
to true
.
To access the settings file, in Sublime Text, simply go to Settings
or Preferences
and then choose > Package Settings
> Close All without Confirmation
> Settings
.
Frequently Asked Questions
Q: Does the plugin only close unsaved files or all files?
A: The 'Close All without Confirmation' plugin closes all files, both unsaved and saved, with the main benefit being that you won't be prompted for each unsaved file. Dealing with multiple confirmation dialogs can quickly become a painful experience. But don’t worry, this plugin has got you covered – it closes all files swiftly and efficiently!
Q: Can I choose to close files only in the active window?
A: Yes, with the latest update, you now have the option to close files either in all windows or only in the active window. When you trigger the Close All without Confirmation
command, a quick panel will appear with these two options. Simply select your desired option and press Enter to confirm. Note that you can only choose this if the “ask_before_closing” option is turned on (which is by default).
Q: Can you provide an example of when this plugin would be useful?
A: Suppose you've searched and replaced a dozen or hundreds of files with a single click: saving them all is easy with Sublime Text and takes just one command (and no questions asked). But: have you ever tried to close them without saving?
Q: Is there any risk of losing my work when using this plugin?
A: Although the plugin is designed for speed and convenience, accidents can still occur. That's why, by default, you will receive a single confirmation prompt before action, reminding you that any unsaved changes will be lost. However, if you wish to disable this prompt, you can do so by setting the “ask_before_closing” option to false in the settings. By doing so, the plugin will truly live up to its name.
Q: Will this plugin slow down my Sublime Text or cause any performance issues?
A: No, the Close All without Confirmation plugin is lightweight and efficient. It should not cause any noticeable performance issues in your Sublime Text environment.
Q: Can I get key bindings? I need a shortcut for this wonderful timesaver!
A: Of course! Your fingers shall not be denied their favorite key combinations. Check the Key Bindings section to set your own shortcut.
License
MIT License