[Padre-dev] Snippets

Gabor Szabo szabgab at gmail.com
Tue Nov 18 07:49:41 PST 2008


On Tue, Nov 18, 2008 at 10:25 AM, Kaare Rasmussen <kaare at jasonic.dk> wrote:
> Hi
>
> Hacking for fun and non profit on the Padre code I started on a solution for
> ticket #97 (http://padre.perlide.org/ticket/97).

that's good!

>
> Currently there is
>  - A sqlite table called snippets w/ category, name and code
>  - A new module, Padre::Wx::Dialog::Snippets
>  - A key binding (Alt-S, who wants a shortcut for the methods window anyway?)
>  - Some setup code in Padre::DB

I am not sure if the users (some of them at least) would not prefer to
have all the snippets
in plain files so they can keep them in version control.

I need key binding to go to the methods window, or rather I think we
should provide it
for those who prefer to use the keyboard for almost everything. I
don't mind what is the exact
key though and if it seems to be really infrequent use then we can
just let people use the
Windows/ menu item.


> For anyone familiar with the perl gvim extensions, the idea is to add the
> snippets from there (statements like if, foreach etc, regexes, file tests)
> as a basis and then the user should be able to amend the distributed list.

Personally I have never liked the snippets much so I'd rather you guys decide.

> When the user hits the hotkey there's a popup with category and name
> Wx::Choice fields.

This sounds right.

> Now I'd like to ask if this is the path. I'm at a point where I can say to
> myself that I used the time to get to know Wx programming, but where there
> is no point in further development if it's not what is wanted.

Even if other don't like this you could always implement it as a plug-in.

> Of course it's only basic functionality right now. The TODO could include
>  - Editing of snippets list
>  - Some information of where to put the cursor after insertion

Show us the code!

Gabor


More information about the Padre-dev mailing list