[Tutor] Remaking Vim in Python (was Python Editors)
project5 at redrival.net
Fri Sep 23 20:14:37 CEST 2005
Ed Singleton wrote:
> My instinct was to try and write a small program similar to vim, but
> in Python. The very basics should be quite easy. If I start a system
> that is very easily expandable then as and when I need further
> functionality I can add it in.
I'd say it's better to either adapt an existing editor or write a new
editor from scratch, but using an existing editor component. Under
wxPython you could use the Scintilla control. This approach is much less
time consuming than writing your own text editor control which will most
likely end up either being less powerful than what you'd get for free if
building on existing functionality. Text editors are more fiddly than
you might expect, because they offer a lot of functionality people don't
even notice is there until they come across one which lacks it. E.g. I
avoid IDLE and Leo simply because I don't like their editing components.
You might even be interested in customizing Vim itself. I don't know
what your goals are, but you could e.g. look at Cream
(http://cream.sf.net) for a more user-friendly Vim.
> I know it would be ambitious to try and do this, but is it stupidly ambitious?
It's not stupidly ambitious, but odds are (simply based on the amount of
editors out there and the features they have) that you'll end up with
not much more than a slightly fancy notepad. This can of course still be
a useful learning exercise, but if you want to have an editor in which
to be productive, it's probably better to invest some time in learning
to use one of the existing options. Whether it's Spe, Scite, Komodo,
Vim, Emacs or whatever else suits you, is not very relevant.
Mail address in header catches spam. Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V
ernq gur yvfg, fb gurer'f ab arrq gb PP.
More information about the Tutor