diff options
Diffstat (limited to '')
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/eval | 8 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/for | 5 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/fore | 5 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/if | 5 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/ife | 7 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/ifee | 9 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/sub | 5 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/unless | 5 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/while | 5 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/xfore | 3 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/xif | 3 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/xunless | 3 | ||||
-rw-r--r-- | emacs.d/snippets/text-mode/perl-mode/xwhile | 3 |
13 files changed, 66 insertions, 0 deletions
diff --git a/emacs.d/snippets/text-mode/perl-mode/eval b/emacs.d/snippets/text-mode/perl-mode/eval new file mode 100644 index 0000000..c1f1e1b --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/eval @@ -0,0 +1,8 @@ +#name : eval { ... } if ($@) { ... } +# -- +eval { + ${1:# do something risky...} +}; +if (\$@) { + ${2:# handle failure...} +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/for b/emacs.d/snippets/text-mode/perl-mode/for new file mode 100644 index 0000000..ec5532f --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/for @@ -0,0 +1,5 @@ +#name : for (...) { ... } +# -- +for (my \$${1:var} = 0; \$$1 < ${2:expression}; \$$1++) { + ${3:# body...} +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/fore b/emacs.d/snippets/text-mode/perl-mode/fore new file mode 100644 index 0000000..c878a0e --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/fore @@ -0,0 +1,5 @@ +#name : foreach ... { ... } +# -- +foreach my \$${1:x} (@${2:array}) { + ${3:# body...} +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/if b/emacs.d/snippets/text-mode/perl-mode/if new file mode 100644 index 0000000..3191b97 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/if @@ -0,0 +1,5 @@ +#name : if (...) { ... } +# -- +if ($1) { + $0 +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/ife b/emacs.d/snippets/text-mode/perl-mode/ife new file mode 100644 index 0000000..23f7cf6 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/ife @@ -0,0 +1,7 @@ +#name : if (...) { ... } else { ... } +# -- +if ($1) { + $2 +} else { + $3 +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/ifee b/emacs.d/snippets/text-mode/perl-mode/ifee new file mode 100644 index 0000000..7c187d1 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/ifee @@ -0,0 +1,9 @@ +#name : if, elsif, else ... +# -- +if ($1) { + ${2:# body...} +} elsif ($3) { + ${4:# elsif...} +} else { + ${5:# else...} +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/sub b/emacs.d/snippets/text-mode/perl-mode/sub new file mode 100644 index 0000000..5ab54d7 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/sub @@ -0,0 +1,5 @@ +#name : sub ... { ... } +# -- +sub ${1:function_name} { + $0 +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/unless b/emacs.d/snippets/text-mode/perl-mode/unless new file mode 100644 index 0000000..baeffa2 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/unless @@ -0,0 +1,5 @@ +#name : unless (...) { ... } +# -- +unless ($1) { + $0 +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/while b/emacs.d/snippets/text-mode/perl-mode/while new file mode 100644 index 0000000..9c2c470 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/while @@ -0,0 +1,5 @@ +#name : while (...) { ... } +# -- +while ($1) { + $0 +}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/xfore b/emacs.d/snippets/text-mode/perl-mode/xfore new file mode 100644 index 0000000..58e455d --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/xfore @@ -0,0 +1,3 @@ +#name : ... foreach ... +# -- +${1:expression} foreach @${2:array};
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/xif b/emacs.d/snippets/text-mode/perl-mode/xif new file mode 100644 index 0000000..1d4dba8 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/xif @@ -0,0 +1,3 @@ +#name : ... if ... +# -- +${1:expression} if ${2:condition}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/xunless b/emacs.d/snippets/text-mode/perl-mode/xunless new file mode 100644 index 0000000..f456db3 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/xunless @@ -0,0 +1,3 @@ +#name : ... unless ... +# -- +${1:expression} unless ${2:condition}
\ No newline at end of file diff --git a/emacs.d/snippets/text-mode/perl-mode/xwhile b/emacs.d/snippets/text-mode/perl-mode/xwhile new file mode 100644 index 0000000..2515586 --- /dev/null +++ b/emacs.d/snippets/text-mode/perl-mode/xwhile @@ -0,0 +1,3 @@ +#name : ... while ... +# -- +${1:expression} while ${2:condition};
\ No newline at end of file |