]> git.madduck.net Git - etc/vim.git/blobdiff - .vim/snippets/perl.snippets

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

enable format_flowed support
[etc/vim.git] / .vim / snippets / perl.snippets
deleted file mode 100644 (file)
index cf8f9fc8567caeb0785d020f47cf76b7b6c8fb69..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,91 +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}
-# For Loop
-snippet for
-       for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) {
-               ${4:# body...}
-       }
-# Foreach Loop
-snippet fore
-       foreach my $${1:x} (@${2:array}) {
-               ${3:# body...}
-       }
-# Foreach Loop One-line
-snippet xfore
-       ${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}
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..a8b67aeb8969b206d5d09b4f7f27e8bab605b5ea
--- /dev/null
@@ -0,0 +1 @@
+/usr/share/vim/addons/snippets/perl.snippets
\ No newline at end of file