How do I get Xcode-like tab-completion in TextMate?
Xcode shows you 开发者_如何转开发a grayed-out version of what it will complete to and if you hit tab or right-arrow, it will complete. It's pretty sweet. Is this possible in TextMate?
Thanks!
Matt
TextMate will not show you a greyed-out version of what it thinks you're intending to type, but it does support tab triggers for keywords. For example, if you're using the standard Objective-C bundle, type "cl", then hit tab, and it will expand to
@interface object : NSObject
{
}
@end
@implementation object
- (id)init
{
if((self = [super init]))
{
}
return self;
}
@end
In TextMate, you can go to the menu Bundles > Bundle Editor > Show Bundle Editor to see the various snippets, along with their tab triggers, for each of the bundles you have installed.
Also, you can partially type something (like the first few letters of a variable or method), then hit esc
and TextMate will complete what it thinks you're intending to type. If TextMate is wrong, keep hitting esc
to get to the correct option.
精彩评论