is there a particular situation where atomic saves are better than the current implementation?
Why is atomic save useful?
Atomic saves are preferable because you will never end up with a mangled file if anything untoward happens while saving.
You can loose meta data about the file, such as extended attributes and resource forks. OS X and Windows both provide APIs to preserve the metadata, which Sublime Text uses, but these wonāt work in all scenarios (e.g., over some network drives), and thereās no equivalent on Linux. You can also get into trouble if editing a file in a directory with strange permissions, e.g., if itās setup to allow modifying existing files, but not create new ones.
Just remember that atomic save is notoriously bugged in Sublime Text (at least versions 2 and 3), and should not be used until the bugs have been fixed
Considering Sublime Text 2 doesnāt even have the concept of atomic saves - you might want to take this statement with a grain of salt.
Just for the record: disable this trick in preferences if you want file updates to be visible to concurrent processes by normal means.
i.e. with the default setting, another process that has open(2)'d a file you then open, edit and save with Sublime wonāt see those changes because theyāre made to a different underlying file.
If your having issues with saved files not being synced to a vagrant box, this setting is the culprit.
set it to false to fix.
I have to use atomic saving, because I have a remote drive hooked up as a mounted Windows SFTP drive. Without atomic_save being āfalseā it fails whenever I try to save a document.
Unfortunately, thereās no way to say āatomic save on drive Qā and ānon-atomic-save on every other driveā.
I created a userecho request to do this: sublimetext.userecho.com/topic/516558-/
It should just be disabled. In theory, atomic saving is a good idea, but in practice it just doesnāt work. Also, most file watchers will not understand whatās happening with the file (deleted, then another file renamed) and do something unpredictable.
Atomic saving should be done at the OS level imo with a specific API for that which works around all these issues, not by an application.
I also recommend disabling this feature (which I believe should be its default state). I learned of its adverse effects the hard way. I was editing files in a versioned SharePoint document library. Atomic saveās process of deleting the original file and renaming the .tmp file to the original file name completely wiped out all previous versions of the documents I was editing. So much for our audit trail!