1

I'd like to delete the contents of the line I'm on without entering insert mode. Right now I have to do cc then Escape to go back to normal mode, is there a shorter key sequence if I'm in the middle of the line?

4
  • 1
    0D. 0 moves to first column, D clears all to right starting with cursor position. 0 can be changed to ^, if you want to save indent.
    – Dmitry
    Aug 11 '20 at 7:01
  • 2
    Maybe not an exact duplicate but strongly related: vi.stackexchange.com/q/3563/1841
    – statox
    Aug 11 '20 at 7:04
  • Assuming you mean normal mode, not command, which called with :
    – Dmitry
    Aug 11 '20 at 7:04
  • 1
    @Dmitry Actually OP is right: normal mode is also called command mode (see :h command-mode) because that's where you input commands. The mode started with : you are referring to is the command line mode :h Command-line-mode
    – statox
    Aug 11 '20 at 7:40

Browse other questions tagged or ask your own question.