This is a list of supported snippets provided by this plugin.
use v6;
use Test;
${1:use lib 'lib';}
plan ${2:$num-tests};
given ${1:$var} {
when ${2:condition} {
${3:# code block ...}
}
${4}
default {
${5}
}
}
${1:condition} ?? ${2:value-if-true} !! ${3:value-if-false};
elsif ${1) {
${2}
}
if ${1} {
${2}
}
else {
${3}
}
method ${1:method_name}(${2:$attr}) {
${3}
}
has ${1:Type} ${2:$!identifier};
unless ${1} {
${2}
}
for "${1:filename}".IO.lines -> $line {
${2}
}
method ${1:!}${2:method_name}(${3:$attr}) {
${4}
}
repeat {
${1}
} ${2:while|until} ${3};
loop (my ${1:$i} = 0; $$1 < ${2:count}; $$1++) {
${3}
}
multi ${1:function_name}(${2:Str $var}) {
${3}
}
my ${1:$var} = "${2:filename}".IO.slurp;
submethod ${1:submethod_name}(${2:$attr}) {
${3}
}
#!/usr/bin/env perl6
${1:my} class ${2:ClassName} ${3:is|does Parent|Role}{
${4}
}
for ${1:@array} -> ${2:$variable} {
${3}
}
${1:expression} if ${2:condition};
sub ${1:function_name}(${2:Str $var}) {
${3}
}
=begin pod
$1
=end pod
#!/usr/bin/env perl6
use v6;
say "Hello world";
while ${1} {
${2}
}
${1:expression} unless ${2:condition};
if ${1} {
${2}
}