How to Delete Lines in Vim / Vi

Vim comes out as an outstanding tool that helps to configure files and editing text mostly under Linux. One quirk of Vim that many cannot acknowledge is its capability to delete or erase complete lines in a text or file. Nothing complex about Vim but learning it is definitely useful. Like every other work, deleting a line in Vim too has various methods. Vim, the widely known editor for text in Linux, can undo one or many patterns in a single command. This tutorial will help you get knowledge on deleting lines by range or pattern by various options provided by Vim. Various ways to delete a line in Vim How to delete a single line? Press on the Esc key and rapidly move along different files. Move the cursor towards your line of choice for deleting. If you want to delete a line, you need to press one of the following commands, DD D Deleting a single word Pressing Esc helps you enter the mode of command. Next step involves the pointer being placed at the start of the very word. Press down on the key that instant. Steps for deleting multiple rows? Start by pressing the Esc key.…