This plug-in lets you type the first few letters of a template and hit ALT-J to extract a code snippet. Author: Joao Nuno Carvalho
Smart Templates is a macro expansion tool. Currently it expands macros that are defined in the
SmartTemplates.py file, with proper indentation in the case of multi-line macros. The developer can jump
Animated Example of Usage:
In the above animation, the user types in ifn then presses ALT-J. Once the template text is inserted, he/she jumps between the ? marks using ALT-H.
1. Edit your c:\python22\Tools\idle\config-win.txt (or config-unix.txt if you are running unix/linux) and add the following entry
2. Put SmartTemplates.py into your c:\python22\Lib\site-packages directory.
3. Restart idle.
Comments and Links
To add your own templates, you need to edit the file SmartTemplates.py itself.
Other IDLE plug-ins.