next up previous contents
Next: Changing Text Up: The vi Editor Previous: Adding Text

Deleting Text

  As you might guess, the ``d'' command is responsible for deleting text. To delete text, we need to combine the delete command with a command saying how much to delete: a word (dw), a line (dd (or D)). Non-intuitively, to delete a single character is ``x'', to delete n characters is nx. If you want to delete the character in front of the cursor (a destructive backspace), the command is ``X''.


next up previous contents
Next: Changing Text Up: The vi Editor Previous: Adding Text

Gordon Haverland
Sat Oct 9 13:50:48 MDT 1999