alexxxm has asked for the wisdom of the Perl Monks concerning the following question:

I intend to write down a mindmap program, and to start fast I'd like not to reinvent the wheel: I need a very simple editor written in Perl, around which to build the program.

Up to now I just found Very Simple Editor (http://webscripts.softpedia.com/script/Health/Tet-Editors/Very-Simple-Editor-58303.html) and Kephra.

The 1st is maybe a bit too simple, while Kephra is really too much.

Do you now of other code examples - possibly in Tk?

thanks!!!

alessandro

Replies are listed 'Best First'.
Re: Editors written in Perl
by Corion (Patriarch) on Sep 12, 2010 at 18:47 UTC

    There also is Padre, which is a relatively mature editor with aspirations of an IDE.

Re: Editors written in Perl
by AnomalousMonk (Archbishop) on Sep 12, 2010 at 23:13 UTC

    Tk also has Tk::Text::SuperText, 'An improved text widget for perl/tk' that has a lot of nice editing features. Works well in Strawberry, don't know about any other platforms.

Re: Editors written in Perl
by Anonymous Monk on Sep 12, 2010 at 18:44 UTC
    gedi comes Tk
Re: Editors written in Perl
by zentara (Cardinal) on Sep 13, 2010 at 09:27 UTC
    More ideas.....also see Insert something like a hyperlink in a Tk Text widget
    #!/usr/bin/perl use warnings; no warnings 'redefine'; use strict; #right click for menus use Tk; use Tk::TextEdit; use Tk::TextUndo; my $top = new MainWindow; my $textedit = $top->TextEdit->pack; $textedit->SetGUICallbacks([sub {}]); MainLoop; sub Tk::TextUndo::insertStringAtStartOfSelectedLines{ my ($w,$insert_string)=@_; $w->addGlobStart; my @sel_lines = $w->SelectedLineNumbers; $w->MarkSelectionsSavePositions; foreach my $line (@sel_lines){ $w->insert($line.'.0', $insert_string); } $w->RestoreSelectionsMarkedSaved; $w->addGlobEnd; } sub Tk::TextUndo::deleteStringAtStartOfSelectedLines{ my ($w,$insert_string)=@_; $w->addGlobStart; my @sel_lines = $w->SelectedLineNumbers; $w->MarkSelectionsSavePositions; my $length = length($insert_string); foreach my $line (@sel_lines){ my $start = $line.'.0'; my $end = $line.'.'.$length; my $current_text = $w->get($start, $end); next unless ($current_text eq $insert_string); $w->delete($start, $end); } $w->RestoreSelectionsMarkedSaved; $w->addGlobEnd; }

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
Re: Editors written in Perl
by szabgab (Priest) on Sep 14, 2010 at 12:01 UTC
    In the repository of Padre, the Perl IDE you can find a script which is more or less the first version of Padre. It is a very simple editor using WxPerl.
Re: Editors written in Perl
by ambrus (Abbot) on Sep 15, 2010 at 07:38 UTC