zach waugh
  • Blog
  • Projects
  • About
zachwaugh

Using Dropbox to sync TextMate

April 27, 2009 - 0 Comments - textmate dropbox mac

I use TextMate at both home and work for doing all my development and for dealing with pretty much anything text related. I got tired of having inconsistent environments between work and home. I wanted to be able to create a new snippet at work and be able to use it at home (and vice versa) without having to recreate it. Turns out you can do this easily with Dropbox.

Dropbox1 is a service to sync files across multiple computers and to the cloud, and It’s free to use with 2GB of storage. It makes it dead simple to keep files in sync and you can access those files from the web as well. All you have to do is store your TextMate specific files in your Dropbox account, and then point TextMate to use those files.

  1. 1. Quit TextMate if you have it running

  2. 2. Move the ~/Library/Application Support/TextMate folder to your Dropbox

  3. 3. Open up Terminal and create a symbolic link from your ~/Dropbox/TextMate folder to your ~/Library/Application Support folder:

  4. $ ln -s ~/Dropbox/TextMate ~/Library/Application\ Support/TextMate
  5. 4. Repeat steps 1-3 on all the computers you want to sync.

Now any changes you make to your TextMate bundles on any computer will be synced across all your machines. For this to work transparently, you’ll want to make sure Dropbox is running at login.

1If you don’t have a Dropbox account, sign up using this link and we both get extra storage space for free.

Preventing TextMate from creating ._ files on network drives

July 9, 2008 - 0 Comments - textmate mac

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.

ELSEWHERE...

  • Twitter
  • Github
  • Delicious
  • Flickr
  • Blog RSS feed
  • Email

© 2010 Zach Waugh