auto-save
Automatically saves the current file after every modification
Details
Installs
- Total 200K
- Win 139K
- Mac 30K
- Linux 31K
Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 28 | 19 | 25 | 21 | 12 | 13 | 15 | 25 | 18 | 30 | 19 | 11 | 11 | 13 | 15 | 31 | 15 | 17 | 19 | 7 | 13 | 15 | 12 | 23 | 9 | 16 | 10 | 17 | 16 | 18 | 20 | 17 | 27 | 17 | 11 | 17 | 23 | 19 | 16 | 14 | 13 | 9 | 19 | 19 | 22 |
Mac | 0 | 3 | 8 | 9 | 4 | 2 | 2 | 3 | 2 | 2 | 1 | 4 | 3 | 3 | 1 | 0 | 4 | 3 | 1 | 6 | 1 | 3 | 5 | 1 | 1 | 1 | 2 | 3 | 2 | 4 | 1 | 1 | 5 | 0 | 3 | 1 | 3 | 4 | 2 | 5 | 4 | 0 | 2 | 1 | 3 | 2 |
Linux | 0 | 2 | 3 | 8 | 3 | 3 | 4 | 6 | 4 | 2 | 7 | 2 | 5 | 3 | 2 | 6 | 3 | 5 | 3 | 4 | 4 | 2 | 7 | 3 | 3 | 4 | 4 | 11 | 2 | 3 | 3 | 6 | 10 | 6 | 8 | 4 | 7 | 4 | 4 | 3 | 12 | 10 | 5 | 2 | 3 | 4 |
Readme
- Source
- raw.githubusercontent.com
auto-save
A Sublime Text plugin that automatically saves the current file after every modification.
Synopsis
In the occasion where you'd want Sublime Text to save the current file after each change, you can use this plugin.
Demo
Installation
From Package Control
auto-save is available through Sublime Package Control and is the recommended way to install.
From Github
Alternatively, you may install via GitHub by cloning this repository into the Packages
directory under Sublime Text's data directory:
On Mac:
cd ~/Library/Application Support/Sublime Text 3/Packages
git clone https://github.com/jamesfzhang/auto-save.git
Usage
By default, auto-save is disabled because it is a fairly invasive plugin. To make it less invasive, you can instruct it to only auto-save changes to the file that is active when you turn on auto-save. In this mode, it will ignore changes to all other files.
To run auto-save whenever a file is modified, set "auto_save_on_modified": true
in your user settings. To ignore certain files, set auto_save_ignore_files
to a list of file suffices like [".yml", "package.json"]
.
You can also instruct it to auto-backup the file instead of auto-saving it. The backup gets created in the same directory as its source file. The backup file takes the same name as its source file, with the string .autosave
inserted directly before the file extension. When auto-save is disabled, the backup file is deleted.
There are two ways to enable it. You can press Command + Shift + P to bring up the Command Palette, and search for AutoSave. Here, there are 3 options:
- Toggle AutoSave: all files
- Toggle AutoSave: current file only
- Toggle AutoSave Backup: current file only
Alternatively, you can bind commands to turn the plugin on or off. For example, to toggle auto-save for all files, open “Preferences / Key Bindings - User” and add:
{ "keys": ["ctrl+shift+s"], "command": "auto_save" }
To toggle it for only the current file, and instruct to make a backup of the file instead of saving the file itself, you could add:
{ "keys": ["ctrl+shift+s"], "command": "auto_save", "args": {"all_files": false, "backup": true} }
This key bindings file takes an array of key bindings so please ensure that this key binding, along with any existing ones, are properly wrapped in []
.
With this setting, pressing Ctrl + Shift + S will turn the plugin on or off. A status message will be displayed in the Sublime Status Bar each time the plugin is turned on or off.
By default, auto-save debounces “save” events by 1 second. For fast typers, this improves performance dramatically such that “save” events are not called constantly, just when it matters.
License
Author
auto-save was created and maintained by James Zhang. Give him a shoutout at @jamesfzhang if you have comments or questions.