Hi Joachim and TextMate peoples
I've had a look at the WIP Objective-C and C bundles and firstly a question:
- Why does the Singleton template create an Objective-C++ implementation
file - file extension is .mm? Also it might be preferable to use Apple's "recommended" singleton implementation: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/...
To the best of my knowledge I have made any changes to this, I do not personally use the templates. Perhaps someone else can reply?
- The help is a lot better without the side frame.
The help uses a standard template which I assume is used for all markdown docs, I guess it can be switched somehow.
These next points are just stuff I've noticed in the current Objective-C bundle:
- Underscores in implementation and interface files aren't supported. (eg.
"@interface TestCoreData_AppDelegate : NSObject" - "AppDelegate" will not be highlighted).
This seems like a regexp bug that should be easy to fix. Thanks for bringing it to my attention. Will fix asap.
- "Reformat Method Call" is a really good tool for keeping code tidy, but
there are some problems with indenting that makes it less worthwhile. An example is the following code call (imagine I've just hit control-Q to reformat and the NSWindow call is all nice an indented)
isHidden = YES; mainWindow = [[NSWindow alloc] initWithContentRect:windowRect
styleMask:NSTitledWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask backing:NSBackingStoreBuffered defer:NO screen:[NSScreen mainScreen]];<caret>
- Pressing enter/return on the last line will continue on the next line
directly under "screen:..." - this is fine and expected. 2. Getting back to normal indent (aligned with "mainWindow" and "isHidden") requires pressing backspace 11 times. Note that if you hit tab at anytime you will be catapulted under "screen:" and have to start again.
Is there anyway around this in the syntax file or would this require changes to how TextMate auto-indents?
I do not think messing with the indent/dedent patterns are going to help. I actually had a conversation with Allan about this a few months ago since it annoys me as well, he had a few ideas for 2.0 if I recall correctly. A command to do this would involve both code and adding scopes to the syntax grammar (unless I am mistaken about the auto-indent behaviour).
I do feel a little guilty making these assessments because some of this stuff I imagine would be trivial to update. If I were to create some patches, what is the protocol for getting them to people for review? Can I just email, or should I post them to this mailing list first?
The bundle developers hang out in ##textmate (two #) IRC channel at freenode.net. Also check out the dev list. You are more than welcome to submit patches.
Joachim MÃ¥rtensson