How to put marked lines in parenthesis?
-
Hi,
how can i put marked lines in parenthesis?For example:
1: kjhdfgjhgjfkdjhg dsfkjhg sdkjh gf
2: kfjgljjfgkf flf gli f fsljh f
3: khfkjhkjhsdkjhfjfkjhf fjfj wer erwer
4: nmdfss sjh ewr s dfjh f skjh fnow I select (mark) line 2 and 3 and the solution should look like this:
1: kjhdfgjhgjfkdjhg dsfkjhg sdkjh gf
(2: kfjgljjfgkf flf gli f fsljh f)
(3: khfkjhkjhsdkjhfjfkjhf fjfj wer erwer)
4: nmdfss sjh ewr s dfjh f skjh fhow can I achieve that? :)
-
if this is a one time job use find and replace dialog with regular expression
and in selection checked. If you need to do this over and over again, record
a macro and save it. I will describe the steps for the macro as it contains the step
for find/replace as well.-
Select the lines you want to modify
-
press record macro
-
press ctrl+h (to open the replace dialog)
-
put the following into the find inputbox
^(.*)$ -
put the following into the replace inputbox
\(\1\) -
check box in selection
-
check box Regular expression
-
press replace all
-
press save macro
and give it a meaningful name.
It appears now under the macro menu
Cheers
Claudia -
-
Thank you very much!!!
;)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login