vimtext-editorvi

vi to delete from the beginning of the line till the cursor


How can we use vim to delete characters from the beginning of the line till the cursor. Say, we have a string "hello world" while the cursor is on "w". How can we delete from "h" till "w".


Solution

  • Try d0. 0 denotes the beginning of the line.