diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2021-04-26 15:08:41 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2021-04-26 20:34:12 +0200 |
commit | 740243411e21c18bb30051b43aa0140a180fab33 (patch) | |
tree | 9cc326193c9c680faeda5356cee5d8ff364e51cb /.vim/snippets/perl.snippets | |
parent | f179a5690ee59df214b4f3a90049b9bcdfce8712 (diff) |
Remove snipMate
Diffstat (limited to '.vim/snippets/perl.snippets')
-rw-r--r-- | .vim/snippets/perl.snippets | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/.vim/snippets/perl.snippets b/.vim/snippets/perl.snippets deleted file mode 100644 index c85ff11..0000000 --- a/.vim/snippets/perl.snippets +++ /dev/null @@ -1,97 +0,0 @@ -# #!/usr/bin/perl -snippet #! - #!/usr/bin/perl - -# Hash Pointer -snippet . - => -# Function -snippet sub - sub ${1:function_name} { - ${2:#body ...} - } -# Conditional -snippet if - if (${1}) { - ${2:# body...} - } -# Conditional if..else -snippet ife - if (${1}) { - ${2:# body...} - } - else { - ${3:# else...} - } -# Conditional if..elsif..else -snippet ifee - if (${1}) { - ${2:# body...} - } - elsif (${3}) { - ${4:# elsif...} - } - else { - ${5:# else...} - } -# Conditional One-line -snippet xif - ${1:expression} if ${2:condition};${3} -# Unless conditional -snippet unless - unless (${1}) { - ${2:# body...} - } -# Unless conditional One-line -snippet xunless - ${1:expression} unless ${2:condition};${3} -# Try/Except -snippet eval - eval { - ${1:# do something risky...} - }; - if ($@) { - ${2:# handle failure...} - } -# While Loop -snippet wh - while (${1}) { - ${2:# body...} - } -# While Loop One-line -snippet xwh - ${1:expression} while ${2:condition};${3} -# C-style For Loop -snippet cfor - for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4:# body...} - } -# For loop one-line -snippet xfor - ${1:expression} for @${2:array};${3} -# Foreach Loop -snippet for - foreach my $${1:x} (@${2:array}) { - ${3:# body...} - } -# Foreach Loop One-line -snippet fore - ${1:expression} foreach @${2:array};${3} -# Package -snippet cl - package ${1:ClassName}; - - use base qw(${2:ParentClass}); - - sub new { - my $class = shift; - $class = ref $class if ref $class; - my $self = bless {}, $class; - $self; - } - - 1;${3} -# Read File -snippet slurp - my $${1:var}; - { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = <FILE>; close FILE }${3} |