:1,$d
This vi command blanks out the file being edited.
Updated: javisantana suggested another way to emptying a file. Type:
ggdG
in command mode.
:1,$d
This vi command blanks out the file being edited.
Updated: javisantana suggested another way to emptying a file. Type:
ggdG
in command mode.
Add your comment below, or trackback from your own site.
Be nice. Keep it clean. Stay on topic. No spam.
You can use these tags:
(ESC)ggdG works too.
Thanks javisantana. That works too, I’ll update the post with it :)