In TextMate v1, there was an option to save on lost focus. That is, when you'd switch to another application, your TextMate documents would save. How can I recreate this behavior in TextMate 2?
The way to do this has changed as of alpha.9495. From the README at the Save-On-Focus-Lost repo:
You can now set saveOnBlur in .tm_properties to make TextMate save files when focus is lost.
...Using .tm_properties also allows to easily target specific file types, for example one could use:
[ ui/**.php ] saveOnBlur = true
This would then only have .php files in the ui folder auto-save when focus is lost.
This is also really nice because it makes it possible to set this as a project-specific setting.
But if you want to set it as a global setting, edit the file ~/Library/Application Support/TextMate/Global.tmProperties
and add the line saveOnBlur = True
near the beginning, before any lines with filetype-specific settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With