[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help to create a macro to queue some text selections at a given location



In message <CAFztDOnvwSNnbTxWdXnOkdGwx3ECJsRNJ-QSeY8T1pe8Z3rcUg@xxxxxxxxxxxxxx>
          Xavier Louis Tardy <xltardy@xxxxxxxxx> wrote:

> StrongEd, BasASM, mode, is it possible to create a macro to do this :
> merge / queue some selected text at a location, in the same window
> 
> Imagine I have an ASM source, I want to be able to
> put the carret on a given line GL it will be my destination line
> then go to any line in my source, select some text, call the macro
> so that the selection is copied to the destination line and repeat the
> selection process on another line,
> call the macro, and this next selection is copied and added / queued after
> the precedent copied selection on line GL + number of lines of the
> precedent copied selection...
> 
> Again with an example
> Let's say my source is
> 
> aaaaaaaaaaaa
> bbbbbbbbbbbbb
> ccccccccccc
> dddddddddddd
> eeeeeeeeeeee
> ffffffffffffffffffffff
> gggggggggggggg
> HERE
> hhhhhhhhhhhhhhhh
> iiiiiiiiiiiiiiiiiiiiiii
> jjjjjjjjjjjjjjjj
> kkkkkkkkkkkkk
> llllllllllllllllllll
> mmmmmmmmmmmmm
> nnnnnnnnnnnnnnnnn
> oooooooooooooooooo
> 
> I put the carret where HERE is
> then I select
> ' nnnnnnnnnnnnnnnnn'
> call the macro and 'nnnnnnnnnnnnnnnnn' is copied where HERE is
> then I select
> ' dddddddddddd'
>   call the macro and 'dddddddddddd ' is copied after 'nnnnnnnnnnnnnnnnn'
> has been copied
> all this must work per line, which implies that the end of line character
> must be copied too

There is no need to create a macro for this as StrongED can already do
this but in a slightly different way. What you want is to select some
text without moving the caret, and then copy it to where the caret is.

Easy, just hold down Ctrl while selecting the text then Ctrl-C to copy
the text. Hold down Ctrl again, select next bit of text, Ctrl-C to copy,
etc.

Cheers,
Fred.

-- 
StrongED Developer
http://www.stronged.iconbar.com/