mirror of
https://github.com/gryf/snipmate.vim.git
synced 2025-12-19 20:38:05 +01:00
fixed/added some objc snippets
This commit is contained in:
@@ -127,12 +127,12 @@ snippet objacc
|
|||||||
return $2;
|
return $2;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) set$2:($1)
|
- (void)set$2:($1)${3:new$2}
|
||||||
{
|
{
|
||||||
$1 old$2 = $2;
|
[$3 retain];
|
||||||
$2 = [aValue retain];
|
[$2 release];
|
||||||
[old$2 release];
|
$2 = $3;
|
||||||
}
|
}${4}
|
||||||
# for (object in array)
|
# for (object in array)
|
||||||
snippet fora
|
snippet fora
|
||||||
for (${1:Class} *${2:Object} in ${3:array}) {
|
for (${1:Class} *${2:Object} in ${3:array}) {
|
||||||
@@ -165,3 +165,10 @@ snippet rel
|
|||||||
# autorelease
|
# autorelease
|
||||||
snippet arel
|
snippet arel
|
||||||
[${1:foo} autorelease];
|
[${1:foo} autorelease];
|
||||||
|
# Throw an exception
|
||||||
|
snippet except
|
||||||
|
NSException *${1:badness};
|
||||||
|
$1 = [NSException exceptionWithName:@"${2:$1Name}"
|
||||||
|
reason:@"${3}"
|
||||||
|
userInfo:nil];
|
||||||
|
[$1 raise];
|
||||||
|
|||||||
Reference in New Issue
Block a user