views:

175

answers:

3

There are a couple of bundles that I would like to add some functionality to. If I update the bundles via SVN will my additions/updates be replaced?

+2  A: 

Generally, you should check out a bundle's repo in the global /Library/Application Support/TextMate/Bundles directory; then, if you make any changes, the changes will be stored in ~/Library/Application Support/TextMate/Bundles, and you can easily (a) undo changes, or (b) update bundles without conflict.

To be honest, I forget what happens if you check out bundles to ~/Library/Application Support/TextMate/Bundles instead; I think your own changes get mixed in with the bundle itself, which can create conflicts when updating.

mipadi
Yeah as long as you use the Bundle Editor in TM your changes are going to get put in `~/LibraryApplication Support/...`
prodigitalson
+1  A: 

No but if you additions conflict with changes made in SVN you will need resolve those conflicts by comparing and editing the two versions.

prodigitalson
+2  A: 

Here's the idiot-proof way to to make sure you don't unintentionally overwrite your custom-edited version during a Bundle update:

  1. Instead of editing an existing bundle, create a new one (bottom left-hand corner of the Bundle Editor, click on the "+" dropdown then click 'New Bundle') and give it a unique (but descriptive) name.

  2. Then just copy+paste the snippets, macros, commands, etc. that you want to modify, from the original bundle, to new snippet/macro/command windows in the Bundle Editor and start editing.

  3. You might want to give Bundles you create this way names that begin with your initials followed by the name of the bundle you modified, e.g., 'DY-python'.

  4. But it's not the unique name that you rely on to keep them from being overwritten. Actually, TextMate recognizes these by the fact that the name doesn't match the name of any Bundle in the Repository, and so, behind the scenes, TM stores them in a location different from the other Bundles, e.g., ~/Users/dougmbp/Library/Application\ Support/TextMate/Bundles, for the user-modified ones, while the default location for TM Bundles updated from the repository is /Applications/TextMate/Contents/SharedSupport/Bundles/.

  5. There is absolutely no discernible difference to the user in how these two types of Bundles behave--they are accessed, edited, and called just like the conventional Bundles. This way, your modifications will survive Bundle updates, TM version updates, and well as bad things (just make sure you add the path above to your list of back-up locations).

doug