]> git.madduck.net Git - etc/vim.git/blobdiff - .vim/snippets/objc.snippets

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

enable lastplace
[etc/vim.git] / .vim / snippets / objc.snippets
deleted file mode 100644 (file)
index 4749bb776205165978ba319b745e6f5e565efd7f..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,184 +0,0 @@
-# #import <...>
-snippet Imp
-       #import <${1:Cocoa/Cocoa.h}>${2}
-# #import "..."
-snippet imp
-       #import "${1:`Filename()`.h}"${2}
-# @selector(...)
-snippet sel
-       @selector(${1:method}:)${3}
-# @"..." string
-snippet s
-       @"${1}"${2}
-# Object
-snippet o
-       ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5}
-# NSLog(...)
-snippet log
-       NSLog(@"${1:%@}"${2});${3}
-# Class
-snippet objc
-       @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
-       {
-       }
-       @end
-
-       @implementation $1
-       ${3}
-       @end
-# Class Interface
-snippet int
-       @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
-       {${3}
-       }
-       ${4}
-       @end
-# Class Implementation
-snippet impl
-       @implementation ${1:`Filename('', 'someClass')`}
-       ${2}
-       @end
-snippet init
-       - (id)init
-       {
-               [super init];
-               return self;
-       }
-snippet ifself
-       if (self = [super init]) {
-               ${1:/* code */}
-       }
-       return self;
-snippet ibo
-       IBOutlet ${1:NSSomeClass} *${2:$1};${3}
-# Category
-snippet cat
-       @interface ${1:NSObject} (${2:Category})
-       @end
-
-       @implementation $1 ($2)
-       ${3}
-       @end
-# Category Interface
-snippet cath
-       @interface ${1:NSObject} (${2:Category})
-       ${3}
-       @end
-# NSArray
-snippet array
-       NSMutableArray *${1:array} = [NSMutable array];${2}
-# NSDictionary
-snippet dict
-       NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2}
-# NSBezierPath
-snippet bez
-       NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2}
-# Method
-snippet m
-       - (${1:id})${2:method}
-       {
-               ${3}
-       }
-# Method declaration
-snippet md
-       - (${1:id})${2:method};${3}
-# IBAction declaration
-snippet ibad
-       - (IBAction)${1:method}:(${2:id})sender;${3}
-# IBAction method
-snippet iba
-       - (IBAction)${1:method}:(${2:id})sender
-       {
-               ${3}
-       }
-# awakeFromNib method
-snippet wake
-       - (void)awakeFromNib
-       {
-               ${1}
-       }
-# Class Method
-snippet M
-       + (${1:id})${2:method}
-       {${3}
-               return nil;
-       }
-# Sub-method (Call super)
-snippet sm
-       - (${1:id})${2:method}
-       {
-               [super $2];${3}
-               return self;
-       }
-# Method: Initialize
-snippet I
-       + (void) initialize
-       {
-               [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys:
-                       ${1}@"value", @"key",
-                       nil]];
-       }
-# Accessor Methods For:
-# Object
-snippet objacc
-       - (${1:id})${2:thing}
-       {
-               return $2;
-       }
-
-       - (void)set$2:($1)${3:new$2}
-       {
-               [$3 retain];
-               [$2 release];
-               $2 = $3;
-       }${4}
-# for (object in array)
-snippet forin
-       for (${1:Class} *${2:some$1} in ${3:array}) {
-               ${4}
-       }
-snippet forarray
-       unsigned int ${1:object}Count = [${2:array} count];
-
-       for (unsigned int index = 0; index < $1Count; index++) {
-               ${3:id} $1 = [$2 $1AtIndex:index];
-               ${4}
-       }
-# IBOutlet
-# @property (Objective-C 2.0)
-snippet prop
-       @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4}
-# @synthesize (Objective-C 2.0)
-snippet syn
-       @synthesize ${1:property};${2}
-# [[ alloc] init]
-snippet alloc
-       [[${1:foo} alloc] init${2}];${3}
-# retain
-snippet ret
-       [${1:foo} retain];${2}
-# release
-snippet rel
-       [${1:foo} release];
-       ${2:$1 = nil;}
-# autorelease
-snippet arel
-       [${1:foo} autorelease];
-# autorelease pool
-snippet pool
-       NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init];
-       ${2:/* code */}
-       [$1 drain];
-# Throw an exception
-snippet except
-       NSException *${1:badness};
-       $1 = [NSException exceptionWithName:@"${2:$1Name}"
-                                    reason:@"${3}"
-                                  userInfo:nil];
-       [$1 raise];
-snippet prag
-       #pragma mark ${1:foo}
-snippet cl
-       @class ${1:Foo};${2}
-snippet color
-       [[NSColor ${1:blackColor}] set];
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..753da9300904674b6c97855643f8250062029244
--- /dev/null
@@ -0,0 +1 @@
+/usr/share/vim/addons/snippets/objc.snippets
\ No newline at end of file