1

Tip #835   Quickly empty a file in vi

A few quick ways to empty a file of text in vi (all of these are done in command mode):

:1,$d
--
:1[enter]dG
--
ggdG