Vim Delete current line: dd Delete all lines in file: gg dG Details gg moves the cursor to first line of the file. dG deletes from current line to end of the file. Save and quit: :wq Quit without saving: :q!