I love the new mode-based menu interface for macros/snippets/commands. What I'd really love is if I could control which mode menu they show up in.
For example, I've made a couple of commands that are related to HTML. However, since I've made them myself, they show up under the "Custom" menu, when I'd really like them to be under "HTML". Maybe, like with the syntax files, a "mode" key could be added to the macros/snippets/commands plist files where I could specify which mode they should be a part of?
What do you think? Thanks much.
Chris,
Bundles, which Custom.tmbundle is an example of, are really just directories on your hard drive. The snippets and commands you created currently reside in the Custom.tmbundle directory under Snippets and Commands respectively. In order to organize them into a different bundle, HTML for example, you need to move the file that represents each snippet, command, syntax, etc. that you want reorganized to the analogous directory in the HTML bundle via 'mv <filename> <new analogous bundle path>'. This will cause them not to show up in the Custom bundle, but in the bundle you have chosen. The TM docs tell where the bundles are located, but you can do a simple, 'find / -name Custom.tmbundle -print' on the command line to find out. You will do best to use the terminal for this operation.
Let us know if you need more direction. On Jan 7, 2005, at 10:06 AM, Chris Brierley wrote:
I love the new mode-based menu interface for macros/snippets/commands. What I'd really love is if I could control which mode menu they show up in.
For example, I've made a couple of commands that are related to HTML. However, since I've made them myself, they show up under the "Custom" menu, when I'd really like them to be under "HTML". Maybe, like with the syntax files, a "mode" key could be added to the macros/snippets/commands plist files where I could specify which mode they should be a part of?
What do you think? Thanks much. ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I think it's still useful to be able to assign a mode to custom items via a popup in the UI, though. Reorganizing things at the filesystem level is a cumbersome solution at best.
(a different) Chris
On Jan 7, 2005, at 11:28 AM, Lang Riley wrote:
Chris,
Bundles, which Custom.tmbundle is an example of, are really just directories on your hard drive. The snippets and commands you created currently reside in the Custom.tmbundle directory under Snippets and Commands respectively. In order to organize them into a different bundle, HTML for example, you need to move the file that represents each snippet, command, syntax, etc. that you want reorganized to the analogous directory in the HTML bundle via 'mv <filename> <new analogous bundle path>'. This will cause them not to show up in the Custom bundle, but in the bundle you have chosen. The TM docs tell where the bundles are located, but you can do a simple, 'find / -name Custom.tmbundle -print' on the command line to find out. You will do best to use the terminal for this operation.
Let us know if you need more direction. On Jan 7, 2005, at 10:06 AM, Chris Brierley wrote:
I love the new mode-based menu interface for macros/snippets/commands. What I'd really love is if I could control which mode menu they show up in.
For example, I've made a couple of commands that are related to HTML. However, since I've made them myself, they show up under the "Custom" menu, when I'd really like them to be under "HTML". Maybe, like with the syntax files, a "mode" key could be added to the macros/snippets/commands plist files where I could specify which mode they should be a part of?
What do you think? Thanks much. ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
You are right about that. It is a bit cumbersome, but my understanding is that future versions of TM forthcoming will afford an easier way to do this.
On Jan 7, 2005, at 11:37 AM, Chris Thomas wrote:
I think it's still useful to be able to assign a mode to custom items via a popup in the UI, though. Reorganizing things at the filesystem level is a cumbersome solution at best.
(a different) Chris
On Jan 7, 2005, at 11:28 AM, Lang Riley wrote:
Chris,
Bundles, which Custom.tmbundle is an example of, are really just directories on your hard drive. The snippets and commands you created currently reside in the Custom.tmbundle directory under Snippets and Commands respectively. In order to organize them into a different bundle, HTML for example, you need to move the file that represents each snippet, command, syntax, etc. that you want reorganized to the analogous directory in the HTML bundle via 'mv <filename> <new analogous bundle path>'. This will cause them not to show up in the Custom bundle, but in the bundle you have chosen. The TM docs tell where the bundles are located, but you can do a simple, 'find / -name Custom.tmbundle -print' on the command line to find out. You will do best to use the terminal for this operation.
Let us know if you need more direction. On Jan 7, 2005, at 10:06 AM, Chris Brierley wrote:
On Jan 7, 2005, at 20:44, Lang Riley wrote:
You are right about that. It is a bit cumbersome, but my understanding is that future versions of TM forthcoming will afford an easier way to do this.
Yes, already b2 should show the bundle structure in the command/macro/snippet editors and allow you to drag them around, re-order, and create new bundles -- you know, the thing I promised two months ago ;)
I don't think I said it on this list, but in b2 each bundle and bundle item gets a unique ID (when first created) which allow tracking of it in the future (even when renamed, changed etc.).
Merging of custom and default bundles is then done using the per item ID, which means that I have the retired the current system where the presence of a local PHP snippets bundle/directory would take precedence over all default PHP snippets. So when there are new defaults, or the defaults are changed, they will show up for the user, even when he has local items for that particular bundle.
I have also setup a subversion repository [1] to collect bundles (and is dropping the wiki for this) which means the bundles are now in one place, with a consistent structure, and will be automatically included.
All who are maintaining or contributing to the bundles can get a svn account (just write me off list).