Initial commit.

This commit is contained in:
yan
2011-11-17 15:45:33 -06:00
commit 882015bc6d
1819 changed files with 111625 additions and 0 deletions

6
vim/snippets/objc/I.snippet Executable file
View File

@@ -0,0 +1,6 @@
+ (void) initialize
{
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys:
${1}@"value", @"key",
nil]];
}

1
vim/snippets/objc/Imp.snippet Executable file
View File

@@ -0,0 +1 @@
#import "${1:`Filename()`.h}"${2}

View File

@@ -0,0 +1 @@
[[${1:foo} alloc] init]${2};${3}

View File

@@ -0,0 +1 @@
NSMutableArray *${1:array} = [NSMutable array];${2}

1
vim/snippets/objc/bez.snippet Executable file
View File

@@ -0,0 +1 @@
NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2}

6
vim/snippets/objc/cat.snippet Executable file
View File

@@ -0,0 +1,6 @@
@interface ${1:NSObject} (${2:Category})
@end
@implementation $1 ($2)
${3}
@end

3
vim/snippets/objc/cati.snippet Executable file
View File

@@ -0,0 +1,3 @@
@interface ${1:NSObject} (${2:Category})
${3}
@end

5
vim/snippets/objc/cli.snippet Executable file
View File

@@ -0,0 +1,5 @@
@interface ${1:ClassName} : ${2:NSObject}
{${3}
}
${4}
@end

1
vim/snippets/objc/dict.snippet Executable file
View File

@@ -0,0 +1 @@
NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2}

View File

@@ -0,0 +1,7 @@
unsigned int ${1:object}Count = [${2:array} count];
for (unsigned int index = 0; index < $1Count; index++)
{
${3:id} $1 = [$2 $1AtIndex:index];
${4}
}

1
vim/snippets/objc/log.snippet Executable file
View File

@@ -0,0 +1 @@
NSLog(@"${1}"${2});${3}

View File

@@ -0,0 +1,4 @@
+ (${1:id}) ${2:method}
{${3}
return nil;
}

View File

@@ -0,0 +1,4 @@
- (${1:id}) ${2:method}
{${3}
${4:return nil;}
}

View File

@@ -0,0 +1,11 @@
- (${1:id})${2:thing}
{
return $2;
}
- (void) set$2:($1)
{
$1 old$2 = $2;
$2 = [aValue retain];
[old$2 release];
}

14
vim/snippets/objc/objc.snippet Executable file
View File

@@ -0,0 +1,14 @@
@interface ${1:`Filename('', 'object')`} : ${2:NSObject}
{
}
@end
@implementation $1
- (id) init
{
if (self = [super init])
{${3}
}
return self
}
@end

1
vim/snippets/objc/prop.snippet Executable file
View File

@@ -0,0 +1 @@
@property (${1:retain}) ${2:NSSomeClass} *${3:$2};${4}

1
vim/snippets/objc/rel.snippet Executable file
View File

@@ -0,0 +1 @@
[${1:foo} release];${2}

1
vim/snippets/objc/ret.snippet Executable file
View File

@@ -0,0 +1 @@
[${1:foo} retain];${2}

1
vim/snippets/objc/sel.snippet Executable file
View File

@@ -0,0 +1 @@
@selector(${1:method}:)${2}

5
vim/snippets/objc/sm.snippet Executable file
View File

@@ -0,0 +1,5 @@
- (${1:id}) ${2:method}:(${3:id})${4:anArgument}
{
$1 res = [super $2:$4];${5}
return res;
}

1
vim/snippets/objc/syn.snippet Executable file
View File

@@ -0,0 +1 @@
@synthesize ${1:NSSomeClass};${2}