vim remove all lines code example
Example 1: vim select all and delete
Press "esc" button;
Type: ggdG
Example 2: vim delete rest of line
[D] - delete from cursor until end of the line and leave you in command mode.
[C] - delete from cursor until end of the line and leave you in insert mode.
Example 3: vim delete line
# Basic syntax:
dd
# Note, add a number in from of dd to delete that many lines, e.g.:
5dd # Delete the next 5 lines