SMARTedit is a text editor that lets you program text-editing macros by demonstration. SMARTedit stands for Simple MAcro-Recognition Tool editor.

Macros in ordinary text editors, such as emacs, are difficult to use: they're tricky to get right the first time, hard to debug and visualize, and brittle (they don't always work on new cases).

On the other hand, people faced with repetitive text-editing tasks badly need a way to construct simple programs to automate parts of their work. Yet as soon as the tasks get more complicated than simple search-and-replace, the poor user is faced with learning a programming language such as Visual Basic in order to control the application.

SMARTedit addresses these problems by using robust machine learning technology to allow non-programmers to construct complex text-editing programs without writing a single piece of code, simply by interacting directly with the interface. SMARTedit learns programs in a simple yet expressive programming language with constructs such as "move to the beginning of the string tag" and "insert the string <B>".


Walk through an illustrative session with SMARTedit as we teach it how to delete HTML comments from a text file.

System requirements

SMARTedit is written entirely in Python. It requires Python 1.5.2 or greater, Tcl/Tk 8.0 or greater, and Pmw (Python MegaWidgets).


SMARTedit is documented in my doctoral dissertation.


SMARTedit is no longer under active development, but you are welcome to get the code and try it out.

Tessa Lau |
Last modified on 11/23/11