Sublime Forum

Have sublime write bak on open or save?

#1

Hello,
Is there a way to have Sublime write a backup (.bak, .txt~ etc) file, either when I open a file or as part of ‘save’, before it writes changes to the file being edited?

I DON’T what the procedure, like KDE Kate, where it writes the changes to a tmp file, ‘renames’ (moves) the original file then moves (mv) the tmp file to original name. This TRASHES hard linked files (changes inode id because file is actually a new file, generating a new or different inode id, breaking the Hard Link (symlink))

I would want this process to work in both KDE and Enlightenment…

Thank You in advance,
Landis.

0 Likes

#2

I found this setting in Preferences.sublime-settings:

// Save via writing to an alternate file, and then renaming it over the // original file. "atomic_save": false,

But… this does the same thing as kate and will Change the inode id of the Hard Linked File…

Landis.

0 Likes