Hi Nikolay, I am glad that presentation helped you start writing your own Padre plugin.
It would be nice if you could blog about it either in English or in Russian and send us the link to the blog so we can add it to the website. http://padre.perlide.org/about.html regards Gabor ps. Please don't reply to the digest form of this mailing list. Instead start a new message with a new subject. 2011/8/25 Николай Мишин <m...@ya.ru>: > Hi Guys, > > thanks for Sabo Gabor and for YAPC:EU:2011 > > I learned how to create your own functions in Padre in My.pm > > #i use replace_slash (for windows) replace_start_digit (if i copy from vi/vim > (set nu)) > sub replace_slash { > my $self = shift; > my $main = $self->main; > > my $doc = Padre::Current->document; > my $text = $doc->text_get(); > $text =~ s#\\#/#g; > $doc->text_set($text); > > return; > } > > sub replace_start_digit { > my $self = shift; > my $main = $self->main; > > my $doc = Padre::Current->document; > my $text = $doc->text_get(); > $text =~ s/^[0-9]+\s*//mg; > $doc->text_set($text); > > return; > } > #and invoke it here > sub menu_plugins_simple { > my $self = shift; > return $self->plugin_name => [ > 'About' => sub { $self->show_about }, > > 'Replace_slash' => sub { $self->replace_slash }, > 'Replace_start_digit' => sub { $self->replace_start_digit }, > > # 'A Sub-Menu...' => [ > # 'Sub-Menu Entry' => sub { $self->yet_another_method }, > # ], > ]; > } _______________________________________________ Padre-dev mailing list Padre-dev@perlide.org http://mail.perlide.org/mailman/listinfo/padre-dev