dd VIM Command
How to use dd Command in Linux VIM editor?
Explanation
dd stands for delete current line
This command is used to delete the current line from the file. The line is saved in the clipboard, so the line can be used later.
Usage:
dd
Example:
Steps to delete a line from the file using the vim editor.
- Open the file test.txt
$ vim test.txt
- We can notice the text in the file.
- Move the cursor to the second line, which we have to delete.
- Delete the line and the line will be saved in clipboard
Press dd
- The content in the file after the delete operation