|
From: Patrick W. <jed...@pd...> - 2004-09-03 21:48:53
|
I had thought of something like this to enhance the abbreviations in JEdit. I have an abbreviation I use in Java for cls, which expands into a simple class declaration stub. I always need to enter the class name for example, and maybe a package name. The thought I have is that a macro might be able to create markers at the positions where text needs to be entered, or around (surrounding) some boilerplate text to replace. You could then do abbreviation expand next marker next marker next marker to replace the different positions. Would then need to sweep the markers. Haven't coded it tho! But it is one idea you might be able to use. Patrick > > Imagine a simple block of code like this one: > > LET var1.member1 =3D var2.member1 > LET var1.member2 =3D var2.member2 > ... > LET var1.memberN =3D var2.memberN > > Now imagine recording a macro using just the first line as a template. > When > the macro is run, it would help you insert the rest of the N lines, > showing > the autocompletion pop-up twice for each line, with every selection > falling > into the right place. > > Arguably, one could fulfill the same task with a standard copy & paste= , > but > that would require a bit more effort... and it isn't nearly as elegant = or > sophisticated :) > > Thanks, > Esteban. > |