mirror of
https://github.com/joaotavora/yasnippet.git
synced 2026-02-06 07:22:25 +00:00
adding objc-snippets
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: responds
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Responds to Selector
|
||||
## condition: "source.objc, source.objc++"
|
||||
# --
|
||||
${TM_COMMENT_START} ${4:Send $2 to $1, if $1 supports it}${TM_COMMENT_END}
|
||||
if ([${1:self} respondsToSelector:@selector(${2:someSelector:})])
|
||||
{
|
||||
[$1 ${3:${2/((:\s*$)|(:\s*))/:<>(?3: )/g}}];
|
||||
}
|
||||
Reference in New Issue
Block a user