I’m trying to group commands in a bundle, and to create directions for others on how to do
so. Unfortunately I’ve been unable to successfully move a single bundle item.
I feel like I’m very close, and I wonder if anyone could tweak these steps to make it
Please and thanks!
How to move, order or group bundle items in a TextMate 2 Bundle?
** Disclaimer: This does not work**
It seems that it is a manual process of editing a info.plist, using uuidgen on you script
to generate the correct uuid for the info.plist.
But others indicate this is less than successful.
This is what is suggested by all the research I could find (Linked below). I'm leaving
it here in hopes that someone can more easily find the missing piece and improve it.
I've even sent a copy along to the TextMate Mailing List to see if they can find the
First back up your bundle. Then using XCode's plist editor, open your bundle's
Creat this structure if you dont already have it.
1. Right click -> Add Row -> "mainMenu".
2. Change "mainMenu"'s type to Dictionary.
3. Create nested items "submenus", "items", and
"excludedItems", changing "submenus" and "excludedItems" to
"Dictionary" and "items" to Array as you go
4. Open Terminal.app and run the command `uuidgen`
5. Copy the output. (from now on called [UUID#1])
6. Create a new item under "submenus", naming it by pasting [UUID#1]
7. Change [UUID#1]'s type to Dictionary.
8. Add a child to [UUID#1] named "name", set its value to "Network
Scripts" (or whatever)
9. Add a child to [UUID#1] named "items", set its type to Array
10. Add items using the (+) button, each item is a UUID from your commands. To get this
UUID, open the command's file in TextMate. If you try to Open the .tmCommand file
directly TextMate will complain, "The bundle item [Bundle Item]; is already
a) You can simply open the Commands folder, and textmate won't mind opening the
files from the file drawer.
b) or `mate ~/Library/Application Support/Avian/Bundles/[Your Bundle]/Commands/[Your
11. When the file is open find these lines. You're string will be different but
formatted the same.
This is the UUID for your command. Now known as [UUID#2]
12. Go back to the info.plist, in step 9 you created a "items" array, add
[UUID#2] to the array.
13. Add [UUID#2] to a “ordering" (type Array) object on the root of the xml.
14. Repeat 10 - 13 to add multiple items.
Graham P Heath