[Next] [Up] [Previous] [Contents]
Next: Changing text Up: Vi reference Previous: Inserting text

Deleting text

Everything deleted can be stored into a buffer. This is achieved by putting a " and a lowercase letter before the delete command. The deleted text will be in the buffer with the used letter. If an uppercase letter is used as buffer name, the the corresponding buffer will be augmented instead of overwritten with the text. The undo buffer always contains the latest change. Buffers <1-9> contain the latest 9 line deletions ("1 is most recent).


     * | x                  | Delete <*> chars under and after the cursor.
     * | X                  | <*> chars before the cursor.
     * | d<move>            | From begin to endpoint of <*><move>.
     * | dd                 | <*> lines.
     - | D                  | The rest of the line.
     * | <<move>            | Shift the lines described by <*><move> one
                            |   shiftwidth to the left.
     * | <<                 | Shift <*> lines one shiftwidth to the left.
     * | .                  | Repeat latest command <*> times.

c.c.taylor@ieee.org