Page 1 of 1

Apply clip to multiple lines

Posted: Fri May 13, 2011 7:22 pm
by mdvdlone
I have three lines:

one
two
three

I have a clip that can be applied to each line so after each selection and double clicking on the clip, I get the following:

my $one;
my $two;
my $three;

However, if I select all three lines and apply the clip, I get the following:

my $one
two
three;

Make sense since the clip is defined as

my $\^; where \^ applies to the selection.

What I would like happen is selecting all three lines and then applying either a clip or macro to convert all three lines in a single click or keystroke to

my $one;
my $two;
my $three;

Any suggestions/recommendations are much appreciated.

Cheers.

Posted: Fri May 13, 2011 10:03 pm
by ben_josephs
Search | Replace... (<F8>):
Find what: .*
Replace with: my $\0;

[X] Regular expression

Replace All

Posted: Fri May 13, 2011 10:30 pm
by mdvdlone
ben_josephs wrote:Search | Replace... (<F8>):
Find what: .*
Replace with: my $\0;

[X] Regular expression

Replace All
Worked like a charm.
I just created a Macro for it.

Thanks for your prompt response.

Cheers.