1 Answer
- Open the text file using vim editor
- Press
Esc
key to be in command mode - Enter
gg
so that the cursor moves to the first line of the file - Now enter
dG
whuch deletes the content till last line of the file
This is how clear the whole text content of a file using a Vim Editor
Your Answer