D / d$ VIM Command
How to use D / d$ Command in Linux VIM editor?
Explanation
d$ (D) stands for delete from current position to end of line
This command is used to delete the content from current cursor position to end of the line.
Usage:
D / d$
Example:
- Open the file test.txt
$ vim test.txt
- We can notice the text in the file.
Hiox India
Vim Tutorial
Line 1
Line 2
Line 3
- Let us see how to delete the text from the second line third letter to end of the file.
- Move the cursor to the second line third letter using the arrow keys
- To delete the content from current position to end of the line
Press d$ or Press D
- The content in the file after the delete operation