[TxMt] Textmate widget & bundle

Allan Odgaard throw-away-1 at macromates.com
Tue Oct 24 15:46:35 UTC 2006


On 22. Oct 2006, at 19:20, Andy Herbert wrote:

> I agree with the labeling part, I've fixed the whole creation  
> process so you don't have to leave the keyboard to label a widget,  
> when creation is called from Textmate, the widget appears and the  
> whole text input box is selected so you can immediately type in the  
> name without using the mouse. I've also detected enter/return being  
> pressed, so when it is the widget flips back around.

Ah nice -- initially I figured you’d prompt the user before actually  
creating the widget, but this here works as well, and then there is  
only one way to name a widget, so probably good.

> I notice now that all the other bundles have the capitalization  
> rule you've described, I've fixed this in the bundle, as well as  
> giving it a more descriptive name - Widget Creator.

Thanks -- actually AHIG says that all four character words should be  
capitalized, which would include ‘this’, we try to abide by that in  
bundles, but it’s up to you :)

As for the titles, I would suggest:

    Create Widget With Contents of Document
    Create Widget Calling Current Document

Or something which makes the titles more similar, but stresses the  
difference between deep-copying the document, and linking to it.

The Call Document in new Widget does not make it very clear that it  
also creates a widget (exactly like the first action).

I don’t know what Create Widget from this Project does. Can you  
elaborate?

I would drop the Install Widget action, seeing how creating a widget  
auto-installs the widget. Less actions, less to (mis)understand. If  
you insist on keeping it, I would call it something like Install  
Master Widget, so that it is clear that this has nothing to do with  
the other Create Widget … actions.

The Work With Multiple Files should probably also stress that a  
snippet is inserted. So maybe Insert $@ Loop or Insert Argument  
Handling, hmm… not particularly fond of these titles, but something  
with Insert.

One more thing, you should use TM_BUNDLE_SUPPORT instead of  
TM_BUNDLE_PATH. The former points to the Support folder inside the  
bundle, the advantage is that the latter will point to the path of  
the bundle containing the current command, this could be different  
from the master bundle, if the user did a local edit of the current  
command (but did not install the bundle in the local location).





More information about the textmate mailing list