How Do You Delete 4 Lines Using the Vi Unix Editor?
Contents How Do I Delete 4 Lines from the Current Cursor Position in Vi? Press the Esc Key to Make Sure Your Are Not in an Edit Mode. Place the Cursor on the...
Contents
How do I delete 4 lines from the current cursor position in vi?
Press the Esc key to make sure your are not in an edit mode. Place the cursor on the first line to be deleted. Enter :5dd . The current line, and the next four lines should be deleted.
How do you select and delete in vi?
Type Shift-v to enter linewise selection mode, then move the cursor down using j (yes, use h , j , k and l to move left, down, up, right respectively, that’s much more efficient than using the arrows) and type d to delete the selection.