yasnippet/extras/imported/objc-mode/Language Boilerplate/060 SubMethod (sm).yasnippet
2010-03-14 19:58:27 +00:00

12 lines
522 B
Plaintext

# -*- mode: snippet -*-
# key: sm
# contributor: Translated from TextMate Snippet
# name: Sub-method (Call Super)
# condition: (and (yas/objc-implementation-p) (not (yas/objc-method-body-p)))
# --
- (${1:id})${2:`(or yas/selected-text "method")`}${3::(${4:id})${5:${4:$(
yas/objc-guess-instance-name yas/text)}}} {
${1:$(if (string-match yas/objc-void-regexp text) "" "res = ")}[super $2${5:$(
if (string= yas/text "") "" (concat ":" yas/text))}];${1:$(if (string-match yas/objc-void-regexp text) "" "\n return res;")}
}