← All lessons

4. Basic Editing

Step 2 of 5

Deleting characters

Another thing that we often need to do is delete stuff.

The simplest deletion is getting rid of a single character. In Vim, there are two normal mode mappings that we should be aware of:

You can remember this, because x is a cross, and we’re ‘crossing out’ a character.

You can use a count with your command — e.g. 5x — to delete multiple characters at the same time!

In the editor, practice the x and X commands by removing the extraneous spaces between the words.

Loading editor…