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 7593623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:12:57+00:00 2026-05-30T21:12:57+00:00

With insertions, it is very easy to both wipe out a word/section and insert

  • 0

With insertions, it is very easy to both wipe out a word/section and insert over it, like so

  • cw delete until end of word (with space) then go to insert mode
  • ce delete until end of word (without space) then go to insert mode
  • c3w delete until end of the next 3 words (with space) then go to insert mode
  • ct. delete until before period then go to insert mode
  • c$ delete until end of line then go to insert mode

How do I do this with paste operations? Often times I have a line like so

var name = "John Smith"
var name = "Jane Smith"

And I change it to

var name = "John Lee"
var name = "Jane Smith"

And yank (yw) “Lee”, but now if I delete (dw) “Smith” from “Jane Smith”, I no longer have “Lee” in the register to paste back. I know I can use the named registers. Also, I am sure I can use visual mode. However, I figured since this is a pretty common task, there would be a way to use the movement operators (e, w, t/T, f/F,$,0) with the paste command to specify what to paste over.

  • 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-05-30T21:12:58+00:00Added an answer on May 30, 2026 at 9:12 pm

    I think visual mode is the way to go. You just enable visual mode with v or V (if you want to overwrite whole lines at the time), use the movement operators in the usual way to select the area to be replaced and then paste. You take advantage of what you already know.

    Vp overwrites the current line. vwp overwrites the current word.

    You can find an overview of the alternatives at the Vim Wikia.

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

Sidebar

Related Questions

I'm fairly new to C#, and trying to figure out string insertions (i.e. some
I found strand sort very appealing to sort singly linked lists in constant space,
I know this is very easy question, but I couldn't find the answer anywhere.
I have been struggling with this seeminly easy problem for 48 hours, and I
I have a website where businesses can load items for sale. Then end users
I have a very special scenario, and I'm trying to add functionality to list...
Although I understand that it is very convinient to have an index on a
I am attempting to make a registration-like page for a small forum. To register
I am very new to web development and the use of Open Source. I
I have a potentially very long scrolling log of messages within a UITableView The

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.