GUI Editor?
Pete Prodoehl
yellowdog-general@lists.terrasoftsolutions.com
Wed Nov 20 14:57:00 2002
Nothing like being late ;)
In jEdit <http://jedit.org/> I created the following abbreviation:
Abbreviation: if
Text to insert before caret: if (
Text to insert after caret: ) {
}
The result is that when I type if<space> jEdit inserts
if () {
}
with the cursor between the ()'s
I believe this is what you asked for.
Not that I did not create a macro (though jEdit has those) I just
created an abbreviation that will be expanded upon typing if<space>.
It took me about a minute... much less time than it took to write this
email... ;)
Pete
Riley Berton wrote:
> Editors that run under X are generally very good. However, I have always had one gripe: the lack of useful macro expansion. On all editors that I have looked at (and they are numerous) I have yet to see "space bar" expansion of macros so that the usage of macros is easier than just typing out the contents of the macro. For instance, if I wanted to produce this:
>
> if ( <cursor should end up here> ) {
>
> }
>
> and wanted to use a macro to do it, I would need to bind that sequence to some weird (usually unconfigurable) key combination, making it just as much as a PITA as typing it in the first place.
>
> Ideally, an editor should be able to figure out what I mean based on a few user preset macros and the "space bar" would expand the macro, so that typing:
>
> if<space>
>
> would result in my example above. I have been searching for this feature for quite some time in many editors.
>
> I currently use NEdit and was able to write a macro for that editor that used the space bar as it's key, however, it ran very slowly and made the editor less responsive so I had to turn it off.
>
> Does anyone out there know of an 'X' based editor that does what I outlined?
>
> riley