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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:07:28+00:00 2026-06-09T21:07:28+00:00

How can I delete a line without putting it into my default buffer? Example:

  • 0

How can I delete a line without putting it into my default buffer?

Example:

line that will be copied.

line that I want to be substitued with the previous one.

What I’m trying to do:

yy
dd
p

But Vim replaces the recent copied string with the deleted (cutted) one. I know that I can use buffers like, "1yy, dd then "1p, but I always forget to put the copied string in a buffer then I need to paste my contents first (line that will be copied) and then delete what I want (line that I want to be substituted with the previous one.)

How can I really delete a text in Vi(m) without copying it?

Another related question is how I can forward delete a word in insert mode? I want something similar to Ctrl+w.

  • 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-09T21:07:30+00:00Added an answer on June 9, 2026 at 9:07 pm

    Use the “black hole register”, "_ to really delete something: "_d.
    Use "_dP to paste something and keep it available for further pasting.

    For the second question, you could use <C-o>dw. <C-o> is used to execute a normal command without leaving the insert mode.

    You can setup your own mappings to save typing, of course. I have these:

    nnoremap <leader>d "_d
    xnoremap <leader>d "_d
    xnoremap <leader>p "_dP
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I delete the hidden cropped elements from a pdf from command line?
How can I delete the first (!) line of a text file if it's
I am developing UI form that has infragistics grid. Users can delete, submit some
I want to define a macro that can be invoked in different places (at
How can I delete a file which is already in the SVN repository without
Without functions, I can do: DELETE FROM table1 WHERE something='hello' And my rows with
How I can delete an object which I had added before with this code.
I trying to figure out how I can delete from multiple tables in SQL
I have built CMS on cakephp framework. I can delete just one or more
From the documentation: If the platform supports the unsetenv() function, you can delete items

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.