To delete all lines in vim, use this command:
:1,$d
This vim “delete all lines” command can be read like this:
The : character starts vim’s “last line mode.”
The 1 means, “starting at line 1”
The ,$ means, “until the end of the file”
The d means, “delete”
沒有留言:
張貼留言