mirror of
https://github.com/gryf/snipmate.vim.git
synced 2025-12-19 20:38:05 +01:00
added some more objc snippets
This commit is contained in:
@@ -50,6 +50,16 @@ snippet clm
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
# Interface
|
||||||
|
snippet int
|
||||||
|
@interface
|
||||||
|
${1}
|
||||||
|
@end
|
||||||
|
# Implementation
|
||||||
|
snippet impl
|
||||||
|
@implementation
|
||||||
|
${1}
|
||||||
|
@end
|
||||||
snippet ibo
|
snippet ibo
|
||||||
IBOutlet ${1:NSSomeClass} *${2:$1};
|
IBOutlet ${1:NSSomeClass} *${2:$1};
|
||||||
# Category
|
# Category
|
||||||
@@ -151,7 +161,7 @@ snippet prop
|
|||||||
@property (${1:retain}) ${2:NSSomeClass} *${3:$2};${4}
|
@property (${1:retain}) ${2:NSSomeClass} *${3:$2};${4}
|
||||||
# @synthesize (Objective-C 2.0)
|
# @synthesize (Objective-C 2.0)
|
||||||
snippet syn
|
snippet syn
|
||||||
@synthesize ${1:NSSomeClass};${2}
|
@synthesize ${1:property};${2}
|
||||||
# [[ alloc] init]
|
# [[ alloc] init]
|
||||||
snippet alloc
|
snippet alloc
|
||||||
[[${1:foo} alloc] init]${2};${3}
|
[[${1:foo} alloc] init]${2};${3}
|
||||||
@@ -165,6 +175,11 @@ snippet rel
|
|||||||
# autorelease
|
# autorelease
|
||||||
snippet arel
|
snippet arel
|
||||||
[${1:foo} autorelease];
|
[${1:foo} autorelease];
|
||||||
|
# autorelease pool
|
||||||
|
snippet pool
|
||||||
|
NSAutoReleasePool *${1:pool} = [[NSAutoReleasePool alloc] init];
|
||||||
|
${2:/* code */}
|
||||||
|
[$1 release];
|
||||||
# Throw an exception
|
# Throw an exception
|
||||||
snippet except
|
snippet except
|
||||||
NSException *${1:badness};
|
NSException *${1:badness};
|
||||||
|
|||||||
Reference in New Issue
Block a user