mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-16 10:24:18 +00:00
re-design snippets hierarchy
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
#name : eval { ... } if ($@) { ... }
|
||||
# --
|
||||
eval {
|
||||
${1:# do something risky...}
|
||||
};
|
||||
if (\$@) {
|
||||
${2:# handle failure...}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#name : for (...) { ... }
|
||||
# --
|
||||
for (my \$${1:var} = 0; \$$1 < ${2:expression}; \$$1++) {
|
||||
${3:# body...}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#name : foreach ... { ... }
|
||||
# --
|
||||
foreach my \$${1:x} (@${2:array}) {
|
||||
${3:# body...}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#name : if (...) { ... }
|
||||
# --
|
||||
if ($1) {
|
||||
$0
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#name : if (...) { ... } else { ... }
|
||||
# --
|
||||
if ($1) {
|
||||
$2
|
||||
} else {
|
||||
$3
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#name : if, elsif, else ...
|
||||
# --
|
||||
if ($1) {
|
||||
${2:# body...}
|
||||
} elsif ($3) {
|
||||
${4:# elsif...}
|
||||
} else {
|
||||
${5:# else...}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#name : sub ... { ... }
|
||||
# --
|
||||
sub ${1:function_name} {
|
||||
$0
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#name : unless (...) { ... }
|
||||
# --
|
||||
unless ($1) {
|
||||
$0
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#name : while (...) { ... }
|
||||
# --
|
||||
while ($1) {
|
||||
$0
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
#name : ... foreach ...
|
||||
# --
|
||||
${1:expression} foreach @${2:array};
|
||||
@@ -1,3 +0,0 @@
|
||||
#name : ... if ...
|
||||
# --
|
||||
${1:expression} if ${2:condition}
|
||||
@@ -1,3 +0,0 @@
|
||||
#name : ... unless ...
|
||||
# --
|
||||
${1:expression} unless ${2:condition}
|
||||
@@ -1,3 +0,0 @@
|
||||
#name : ... while ...
|
||||
# --
|
||||
${1:expression} while ${2:condition};
|
||||
Reference in New Issue
Block a user