delete everything in a file with Vim
To delete everything in a file with Vim, use this command.
ggdG
explain
gg go to the first line
dG delete to the last line of file (G is movement which is " go to the last line of the document ") …
Read more...