| Version 18 (modified by azawawi, 15 months ago) (diff) |
|---|
Padre::Plugin::Snippet
Notes
- Snippet mode can be entered through <trigger><TAB>
- <trigger> should be matched on a word boundary that ends with the current position
- Shift-TAB traverses all variables (circular is a useful snipMate feature). Does not break snippet mode.
- Movement keys and deletion: Up/down/right/left/page up/page down/home/end/delete automatically exit snippet mode
- Cancel current selection when exiting snippet mode
Sample snippet file
---
#
# Moose snippets bundle for Padre::Plugin::Moose
# Written by Ahmad M. Zawawi (azawawi)
#
# Adapted from 'TextMate Bundle for Moose' by Chris Prather (perigrin)
# https://github.com/perigrin/perl-moose.tmbundle/Snippets
#
# after method modifier
after: |
after '${1:method_name}' => sub {
${2:# body...}
};
# before method modifier
before: |
before '${1:method_name}' => sub {
${2:# body...}
};
# Property
has: has '${1:property}' => ( is => '${2:rw}', isa => '${3:Str}', );
TODO
- Support extended syntax ${index:default_value:list_of_values}
- Support predefined special variables inside default_value
- Import snipMate snippets facility
- Import TextMate snippets facility
- Add mojo HTML snippet to the mix Template
- Support a way to change the current subscope
- Detect whether we're __DATA__ or not (to do some interesting mimetype things to Mojo HTML stuff
Resources
__END__
Attachments
- PadrePluginSnippet.png (22.6 KB) - added by azawawi 15 months ago.
-
mac_look_gnome_shell.png
(40.0 KB) -
added by bowtie 15 months ago.
food for thought only
