The Quest for the Perfect Editor
I have been reading The Productive Programmer by Neal Ford. I bought it on YAPC::EU in Copenhagen at the O'Reilly booth as it looked promising. I was especially interested in the part that was about how to use your editor better. I wanted to know what ideas I might get from the book on how to make Padre, the Perl IDE better.
There were a couple of good points in there beyond the editor stuff but now I would like to focus on chapter 15 Find the Perfect Tool and its entry about the The Quest for the Perfect Editor. Neal mentions several requirements he has for the Perfect Editor and I'd like to see how Padre stands in those issues or where we are going.
- A macro recorder with easily changeable macro language
Padre currently does not have a macro recorder. As far as I know Scintilla - the editor framework I am using has some macro recording capabilities but I have not played wit it yet. What I already did is added an experimental feature (you need to turn it on manually in the config.yml file) where you can run arbitrary perl code within Padre. This can actually turn into a nice macro replaying tool. We can add a feature where users can write short scripts in perl, save them in a special folder and then easily run them in the editor using the menu. Basically it is quite similar to how the plug-in mechanism works currently.
- Launchable from the command line.
Well this is quite obvious for me and it is working. There are a number of improvements I want to make. I would like to be able to open files that do not exists, effectively creating an open buffer but with a filename already associated with it. In addition I guess I would like to add some other command line switches. Maybe we could add one to treat the directory as a project. I am not sure how it would interfere with the other automatic project handling we are planning.
- Regular expression search and replace
Padre has this using the Perl regular expressions but it is still restricted to the current file. I'd like to add support to several other scopes such as All the files currently open, All the files in the project, all the files in the directory with some exceptions defined with wide-cards. I'd also like to be able to restrict the search to the current functions and to the current block (or variable scope).
- Additive cut and copy commands
to be able to collect some parts from one file and then paste them to another file or another place in the same file. We don't have it yet. I should understand how the clipboard works in WxWidgets.
- Multiple registers
to keep the results of multiple copy operations. Should be added too.
Padre works on Linux and Windows and as far as I know also on Mac. We have not tried it on HP-UX or Solaris or AIX yet but I hope WxWidgets can work on those platforms and then will Padre too.
In the meantime a I have added some very naive Parrot and Perl 6 support to Padre. That is, it can provide basic syntax highlighting to PASM, PIR and Perl 6 files. As the implementations are separated into modules we can work on them even while the rest of the code is being refactored. I hope we can soon provide call-tips and context sensitive help to both Perl 5 and Perl 6.
In the meantime, you can download and install Padre using CPAN.pm but as not everything might work on the first try there are some installation instructions on the download page of Padre
Comments bySam Vilain