Vim: How to delete lines

If you need to quickly delete some lines of text document in vim editor, these commands could be useful for you:
  • dd (delete current line)
  • 5dd (delete five lines)
  • d$ (delete to end of line)
  • d0 (delete to beginning of line)
  • :1,.d (delete to beginning of file)
  • :.,$d (delete to end of file)