[TxMt] Merging mine with yours
allan at macromates.com
Thu Aug 11 10:17:12 UTC 2005
On 11/08/2005, at 11.10, Andreas Wahlin wrote:
> Say I begin to edit stuff like furious in the bundle editor, and
> then a new version comes along with some new stuff, how do these
> two get merged, if at all?
It will merge it so that you do get the new stuff, except for the
items you edited or deleted.
So it should act like if you edited my master-copy, and if both of us
makes an edit, your version wins.
And the technical version:
• Initially all items are in TextMate.app/Contents/SharedSupport
• Each item contains an UUID (universal unique identifier).
• If you edit an item, the modified version is stored in ~/Library/
• If you delete an item (or bundle), it stores the UUID of that item
in the preferences file.
So when starting TextMate, all it does is, load all the default
items, except those marked as deleted in your preferences, or those
that have a version in ~/Library/Application Support/TextMate.
Due to the UUID it will be able to recognize items even if you rename
My suggested way to deal with bundles is to create a Custom bundle
where you keep your own stuff.
And when possible, rather than edit a default item, duplicate it and
make changes to the copy.
The latter is generally not possible when dealing with key bindings
-- I'm considering having it only store the new key binding in ~/
Library/... when the actual item is unchanged (and thus take the rest
from the default version). I'm also thinking of adding a way to see
which items differ from the default version in the bundle editor and
if the default has been updated since your change (with something
like a restore button).
This however is a little down on the to-do ;)
> Same goes for themes.
Themes are unfortunately not as advanced. When you edit a theme, it
stored your edited version in ~/Library/Application Support/TextMate/
Themes and will from then on use that in favor of the default
version. I may introduce merging of themes (and restore to default).
More information about the textmate