Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8625521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:48:28+00:00 2026-06-12T07:48:28+00:00

I have an input text as follows – (command (and (A B C) ))

  • 0

I have an input text as follows –

(command (and (A B C) ))
(command (and (D E F) ))
(command (and (G H I) ))
...
...

I would like to copy and paste part of text on the same line as

(command (and (A B C) (A B C)))
(command (and (D E F) (D E F)))
(command (and (G H I) (G H I)))
...
...

Will it be possible to do it using VI Editor automatically?

Update :
I think I missed one important point that the values A,B,C … I… can have variable length. I just used them as symbols.

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:48:31+00:00Added an answer on June 12, 2026 at 7:48 am

    I combine the techniques given by bmearns and Kev.

    So what I did is as follows

    1. start recording the macro by q.
    2. /( to find the opening bracket, so it goes to the second one.
    3. n to goto the third one.
    4. v to mark the visual block
    5. /) to search for the end of the bracket
    6. y to copy the visual block
    7. n to goto next ) bracket
    8. One time arrow key to go next to the closing bracket
    9. p to paste the visual block
    10. Down Arrow key to goto next line.
    11. Home Key to goto first location of the next line.
    12. q to stop recording the macro
    13. @a to do the same operation for all the lines.

    And it worked just completely fine !
    Thanks a lot guys !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using IE7. I have an input box as follows: <input name=location type=text
I have got a simple HTMl form with one field as follows: <input type=text
I have an html as follows: <fieldset id=question1> <legend class='legend'>...</legend> ... <input type=text name=label_no1
I have input fields with randomly-ordered ids as follows: <input type=text id=start1 /> <input
On one part of my website, I have a text label, a text input
I have an input box. On mouseover, I would like a list is to
I have a table inside a form that looks as follows: <td><input type=text name=code[0]
I have a multi-line text input file: If the String Log Number: is present,
I have an input xml as follows, <?xml version=1.0 encoding=utf-8 ?> <?xml-stylesheet type=text/xsl href=cdcatalog.xsl?>
I have an HTML code as follows <body> Hello UserName:<input tyep=text/><br/> Pass:<input type=text/> </body>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.