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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:40:24+00:00 2026-05-25T10:40:24+00:00

When I cut and paste in VIM by pressing v , and go to

  • 0

When I cut and paste in VIM by pressing v, and go to the end of the line using $, and press d, the next line gets moved up to the same line I’m cutting.

How do I stop this?

  • 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-25T10:40:25+00:00Added an answer on May 25, 2026 at 10:40 am

    It moves up because you have removed all the characters including line return/feed.

    There are multiple solutions as usual with Vim. There is no “one true way” but you can try the following commands.

    • You can use D (capital) in normal mode which will erase everything until the end of line.

      See :help D

    • Using another motion

      What you could do instead of using $ to move to the end of the line, use g_. It will move to the last non blank character of the line and won’t select line return.

      See :help g_

      So vg_d should work as you want.

    • Using Replace

      Alternatively, what you could do instead of cutting, you could replace the erased character by a blank using the space character.

      So v$rSPACE should work to erase but it will not save the replaced characters in register (for pasting later for example).

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

Sidebar

Related Questions

When I cut and paste from a Word document into VIM, quotes get translated
Can anyone tell me why this bash script works if I cut and paste
My users will import through cut and paste a large string that will contain
I would like to prevent copy, cut and paste in my TEdit . How
I want to paste something I have cut from my desktop into a file
I'll be the first to admit that this is cut and past programming. I've
Is it possible using some sort of client side code to detect cut and
I saw once a quick and dirty Perl implementation for the cut and paste
It seems like people who would never dare cut and paste code have no
Okay, I will cut and paste from .NET reflector to demonstrate what I'm trying

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.