Preventing TextMate from creating ._ files on network drives

If you use TextMate with files stored on a network drive, you may notice a bunch of hidden files start to creep up. These files begin with "._" and the name of the file. So if you're working on info.php, there will be a ._info.php file in the same directory. These files are used for extended attributes. From the TextMate manual:

"TextMate makes use of extended attributes to store the carets position, bookmarks, what text is folded and is likely to make further use of extended attributes in the future.

For filesystems which do not natively support extended attributes (like network mounted disks), OS X instead stores the extra information in a file named ._«filename», where «filename» is the name of the original file."

These files are small and hidden, but you may not want to litter the network server with these files, especially if you're working with other people. To prevent these files from being created, run the following command in the terminal:

defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1

Quit and restart TextMate to apply the changes. It won't delete the files that have already been created, but it will prevent them from being created in the future. Files on your local drive will be unaffected.