mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-15 01:44:19 +00:00
Last commit before tagging and releasing
This commit is contained in:
0
extras/imported/perl-mode/.yas-make-groups
Normal file
0
extras/imported/perl-mode/.yas-make-groups
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ife
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Conditional if..else
|
||||
# --
|
||||
if ($1) {
|
||||
${2:# body...}
|
||||
} else {
|
||||
${3:# else...}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ifee
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Conditional if..elsif..else
|
||||
# --
|
||||
if ($1) {
|
||||
${2:# body...}
|
||||
} elsif ($3) {
|
||||
${4:# elsif...}
|
||||
} else {
|
||||
${5:# else...}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: xunless
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Conditional One-line
|
||||
# --
|
||||
${1:expression} unless ${2:condition};
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: xif
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Conditional One-line
|
||||
# --
|
||||
${1:expression} if ${2:condition};
|
||||
8
extras/imported/perl-mode/Function (sub).yasnippet
Normal file
8
extras/imported/perl-mode/Function (sub).yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: sub
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Function
|
||||
# --
|
||||
sub ${1:function_name} {
|
||||
${2:# body...}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: xfore
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Loop One-line
|
||||
# --
|
||||
${1:expression} foreach @${2:array};
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: xwhile
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Loop One-line
|
||||
# --
|
||||
${1:expression} while ${2:condition};
|
||||
12
extras/imported/perl-mode/Test.yasnippet
Normal file
12
extras/imported/perl-mode/Test.yasnippet
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: test
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Test
|
||||
# --
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
use Test::More tests => ${1:1};
|
||||
use ${2:ModuleName};
|
||||
|
||||
ok(${3:assertion});
|
||||
17
extras/imported/perl-mode/class.yasnippet
Normal file
17
extras/imported/perl-mode/class.yasnippet
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: class
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Package
|
||||
# --
|
||||
package ${1:ClassName};
|
||||
|
||||
${2:use base qw(${3:ParentClass});
|
||||
|
||||
}sub new {
|
||||
my \$class = shift;
|
||||
\$class = ref \$class if ref \$class;
|
||||
my \$self = bless {}, \$class;
|
||||
\$self;
|
||||
}
|
||||
|
||||
1;
|
||||
11
extras/imported/perl-mode/eval.yasnippet
Normal file
11
extras/imported/perl-mode/eval.yasnippet
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: eval
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Try/Except
|
||||
# --
|
||||
eval {
|
||||
${1:# do something risky...}
|
||||
};
|
||||
if (\$@) {
|
||||
${2:# handle failure...}
|
||||
}
|
||||
8
extras/imported/perl-mode/for.yasnippet
Normal file
8
extras/imported/perl-mode/for.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: for
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Loop
|
||||
# --
|
||||
for (my \$${1:var} = 0; \$$1 < ${2:expression}; \$$1++) {
|
||||
${3:# body...}
|
||||
}
|
||||
8
extras/imported/perl-mode/foreach.yasnippet
Normal file
8
extras/imported/perl-mode/foreach.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: fore
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Loop
|
||||
# --
|
||||
foreach ${1:my \$${2:x}} (@${3:array}) {
|
||||
${4:# body...}
|
||||
}
|
||||
6
extras/imported/perl-mode/hash pointer.yasnippet
Normal file
6
extras/imported/perl-mode/hash pointer.yasnippet
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Hash Pointer
|
||||
# binding: "^l"
|
||||
# --
|
||||
=>
|
||||
8
extras/imported/perl-mode/if.yasnippet
Normal file
8
extras/imported/perl-mode/if.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: if
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Conditional
|
||||
# --
|
||||
if ($1) {
|
||||
${2:# body...}
|
||||
}
|
||||
7
extras/imported/perl-mode/slurp.yasnippet
Normal file
7
extras/imported/perl-mode/slurp.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: slurp
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Read File
|
||||
# --
|
||||
my \$${1:var};
|
||||
{ local \$/ = undef; local *FILE; open FILE, "<${2:file}"; \$$1 = <FILE>; close FILE }
|
||||
8
extras/imported/perl-mode/unless.yasnippet
Normal file
8
extras/imported/perl-mode/unless.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: unless
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Conditional
|
||||
# --
|
||||
unless ($1) {
|
||||
${2:# body...}
|
||||
}
|
||||
8
extras/imported/perl-mode/while.yasnippet
Normal file
8
extras/imported/perl-mode/while.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: while
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Loop
|
||||
# --
|
||||
while ($1) {
|
||||
${2:# body...}
|
||||
}
|
||||
Reference in New Issue
Block a user