Hi, I'll add all of this to the wishlist. However, I'll wait for your patches.
Regards, Detlev On Dienstag, 5. Januar 2010, Larry Shaffer wrote: > I like the template feature in eric4 (latest 4.4 snapshot on Mac OS X). > Especially like the quick keyboard input. Here are some of my suggestions > for additional predefined variables: > > > $clipboard$ > Replaced with any current clipboard contents. > > > $cur_select$ > Replaced with any current text selection. Would only work when > double-clicking the template, which currently deletes any selection. Useful > for wrapping existing code. Would have to accommodate any additional new > indent level. > > > $insertion$ > Sets insertion point for cursor after template is inserted. Usually > defaults to end of template now, though there appears to be a bug in the > current insertion placement calculation. > > > $select_start$ and $select_end$ > Sets span of selected text in template after template is inserted. Good for > making help text in template ready for overwriting. > > > $py:/absolute/path/to/file.py$ > Replaced with executed Python script results, before template is inserted. > Maybe also $py_project:project-root-relative/path/to/file.py$ > > > $dir_project$ > Inserts path to script's current project directory (if any). I believe > $dir_name$ is script's parent directory, not project. > > > I'll try to hack what I can into TemplateViewer.py and submit any diffs if > successful. Adding clipboard, cur_select and dir_project looks > straightforward. > > Editing of template contents within a mini editor would be handy as well. > -- Detlev Offenbach det...@die-offenbachs.de _______________________________________________ Eric mailing list Eric@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/eric