delete lines

The vim “delete all lines” command

vim FAQ: How do I delete all lines in the current text file in vim?

To delete all lines in vim, use this command:


This "vim delete all lines" command can be read like this:

  • Beginning at line 1, and
  • Ending at the last line in the file (represented by the '$'),
  • Delete each line.

I hope this vim "delete all lines" command example has been helpful. If you need any more details/discussion just leave a command below.

vi/vim delete commands and examples

vi/vim editor FAQ: Can you share some example vi/vim delete commands?

The vi editor can be just a little difficult to get started with, so I thought I’d share some more vi commands here today, specifically some commands about how to delete text in vi/vim.

vi/vim delete commands - reference

A lot of times all people need is a quick reference, so I’ll start with a quick reference of vi/vim delete commands: