How to prevent TextMate from overwriting symbolic links? In a web project I have multiple environments and a .htaccess.&lt;env&gt; file for each of them. In each of the environments I've made a symbolic link from .htaccess to the right file.

Now, whenever I use TextMate to edit the file through the symlink, the link gets overwritten by a copy of the link's target file. How can I make TextMate to preserve the symlink?
Disable Atomic Saves in Advanced Preferences.

When atomic saves are enabled, TextMate actually writes to a new file on Save and then moves the file over (hence overwriting your symbolic link).

See http://manual.macromates.com/en/saving_files#atomic_saves for more info.