How can I quickly delete a line in VIM starting at the cursor position?

后端 未结 7 1220
春和景丽
春和景丽 2021-01-29 18:59

I want to be able to delete the remainder of the line I\'m on starting at the cursor\'s position in VIM. Is there an easy command to do this?

To help illustrate, this is

7条回答
  •  一整个雨季
    2021-01-29 19:54

    (Edited to include commenter's good additions:)

    D or its equivalent d$ will delete the rest of the line and leave you in command mode. C or c$ will delete the rest of the line and put you in insert mode, and new text will be appended to the line.

    This is part of vitutor and vimtutor, excellent "reads" for vim beginners.

提交回复
热议问题