mirror of
https://github.com/joaotavora/yasnippet.git
synced 2026-02-05 15:02:26 +00:00
adding objc-snippets
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: objacc
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Object
|
||||
## condition: "(source.objc | source.objc++) & meta.scope.implementation.objc - meta.function-with-body"
|
||||
# --
|
||||
- (${1:id})${2:thing}
|
||||
{
|
||||
return $2;
|
||||
}
|
||||
|
||||
- (void)set${2/./\u$0/}:($1)aValue
|
||||
{
|
||||
$0${1/( \*)?$/(?1:$1: )/}old${2/./\u$0/} = $2;
|
||||
$2 = [aValue retain];
|
||||
[old${2/./\u$0/} release];
|
||||
}
|
||||
Reference in New Issue
Block a user