d0 VIM Command

How to use d0 Command in Linux VIM editor?


d0 stands for delete from the beginning of the line to current position
This command is used to delete the content from beginning of the current line to current cursor position.




  • 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 sixth letter to beginning of the second line.
  • Move the cursor to the second line sixth letter using the arrow keys
  • To delete the content from current position to beginning of the line
    Press d0
  • The content in the file after the delete operation
    d0 Vim Command

Ask Questions

Ask Question