Re: How to add text on multiple lines (without using the Replace menu).

Eric Bouyoux <[email protected]> Sat, 19 Feb 2011 08:49:48 +0100
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
Hi,

Finally, the macro works fine for the person to whom I proposed it.
So thank for your help.

Regards.

Eric Bouyoux.

Le 18/02/2011 15:02, eric.bouyoux a =E9crit :
> On Thu, 17 Feb 2011 13:33:43 -0500, "Aaron W. Hsu" <[email protected]>
> wrote:
>> On Thu, 17 Feb 2011 10:43:37 -0500, eric.bouyoux <[email protected]> =

>> wrote:
>>
>>> OK. I'll see what I can do. I need to learn nedit macro language first
>> I have the following in my nedit.rc file:
>>
>>          Prefix:Ctrl+0:p:R: {\n\
>>                  res =3D string_dialog("Enter prefix: ", "OK")\n\
>>                  replace_in_selection("^", res, "regex")\n\
>>          }\n
>>
> Hi,
>
> This macro works in some particular cases but it does not when the
> selection is done with Ctrl+Left Mouse AND the selection does not start at
> the beginning of the lines.
> I made it work by doing the following :
>
> replace_in_selection("(.)", res"\\\\1", regexp")\n\
>
> BUT, I need to select only ONE character : (.+) does not do the job.
> BUT, it does not work if I select one 'character' inside a 'TAB'
> character.
>
> Thank you for your help.
>
> Eric Bouyoux.
>>> I don't see how I can use a UNIX filter to do the job.
>> You pass it to a program that does a find and replace. There are also
> some
>> prewritten UNIX utilities that do things like prefixing and line
> wrapping.
>>> For keyboard recording, I don't think it will work as the text can
> change
>>> each time.
>> You are just recording the keystrokes, so as long as you use keystrokes =

>> that suit your specific needs each time, then you are okay. For example,
>> if the column is the first one, then I might record the following:
> <word>  =

>> + Down + Home. Then I just repeat that learned set of strokes for each  =

>> line I care about.
>>
>> 	Aaron W. Hsu
>>
>> -- =

>> Programming is just another word for the lost art of thinking.

-- =

NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss