auto-save
Automatically saves the current file after every modification
Details
Installs
- Total 201K
- Win 139K
- Mac 30K
- Linux 31K
Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 15 | 12 | 18 | 18 | 25 | 18 | 22 | 14 | 19 | 10 | 22 | 15 | 21 | 11 | 18 | 15 | 13 | 14 | 18 | 10 | 19 | 11 | 7 | 15 | 13 | 14 | 21 | 13 | 13 | 14 | 10 | 13 | 15 | 14 | 24 | 18 | 18 | 13 | 14 | 14 | 15 | 12 | 14 | 13 | 15 | 28 |
Mac | 2 | 6 | 9 | 4 | 9 | 6 | 5 | 2 | 1 | 4 | 1 | 3 | 3 | 4 | 2 | 2 | 3 | 5 | 0 | 4 | 3 | 2 | 9 | 2 | 5 | 5 | 3 | 1 | 3 | 6 | 6 | 1 | 3 | 3 | 3 | 3 | 1 | 0 | 5 | 4 | 6 | 6 | 3 | 2 | 3 | 5 |
Linux | 5 | 2 | 2 | 3 | 6 | 3 | 8 | 4 | 1 | 2 | 6 | 10 | 10 | 3 | 4 | 1 | 4 | 4 | 6 | 2 | 5 | 6 | 4 | 5 | 2 | 5 | 6 | 8 | 3 | 5 | 3 | 5 | 3 | 7 | 6 | 6 | 2 | 4 | 4 | 5 | 4 | 4 | 9 | 3 | 8 | 7 |
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.