1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [dd (delete line)](<https://delaparra-services.nl/knowledge-hub/dd-delete-line>)

  

Category: Keyboard shortcuts 

# dd (delete line)

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is dd (delete line)?

 

dd (delete line): Vim: delete the current line. Press twice — d then d. In Vim, ` dd ` deletes the current line. Press ` d ` twice in normal mode. The deleted line goes into a register, so you can paste it elsewhere with ` p `, which makes ` dd ` and ` p ` the Vim way to move a line.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about dd (delete line)

  

### How is dd (delete line) used in practice?

 

It follows Vim's pattern of operators and motions. ` d ` means delete, and doubling an operator applies it to the whole line. A number in front repeats it: ` 5dd ` deletes five lines. ` u ` undoes the last change if you went too far.

    

### What should you keep in mind with dd (delete line)?

 

It is worth knowing even if Vim is not your main editor. You will meet it on servers, in Git commit messages and in tools with Vim key bindings. A handful of commands like ` dd `, ` u `, ` i ` and ` :wq ` already make those moments much less stressful.

 

## At a glance

   CategoryKeyboard shortcuts Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Keyboard shortcuts terms

 

- [Clear Screen](<https://delaparra-services.nl/knowledge-hub/clear-screen>) 
- [Command Palette](<https://delaparra-services.nl/knowledge-hub/command-palette>) 
- [Copy Line Up / Down](<https://delaparra-services.nl/knowledge-hub/copy-line-up-down>) 
- [Delete Line](<https://delaparra-services.nl/knowledge-hub/delete-line>) 
- [Delete Previous Word](<https://delaparra-services.nl/knowledge-hub/delete-previous-word>) 
- [Extract Method / Variable](<https://delaparra-services.nl/knowledge-hub/extract-method-variable>)

 

[All terms starting with D](<https://delaparra-services.nl/knowledge-hub#letter-d>)

 

## Skills

 

- ### Editor shortcuts (VS Code / Cursor and Vim)

 

Use when a user asks how to do something faster in VS Code (or Cursor) or Vim, asks what a keyboard shortcut does (e.g. Ctrl+D, Ctrl+Shift+P, F12, gg, dd, yy, ciw, :wq), wants to customise keybindings, or is stuck in Vim. Gives the correct shortcut for their operating system and can write keybindings.json entries.

 [View skill](<https://delaparra-services.nl/skills/editor-shortcuts>) [Download zip](<https://delaparra-services.nl/skills/editor-shortcuts/download>)

 

## Manuals

 

- [Keyboard shortcuts in VS Code and the terminal](<https://delaparra-services.nl/manuals/sneltoetsen-in-vs-code>) 
- [Installing Visual Studio Code](<https://delaparra-services.nl/manuals/visual-studio-code-installeren>)

 

## Need any help?

 

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/dd-delete-line)
