To insert text, you need to switch from command mode to insert mode. You can do this by using one of the several commands listed below. For example, i allows you to add text to the left of the cursor, a allows you to add text to the right of the text, and so on. To get out of insert mode, you hit Esc.
List of Commands
| i | Insert before cursor |
| I | Insert before line |
| a | Append after cursor |
| A | Append after line |
| o | Open a new line after current line |
| O | Open a new line before current line |
| r | Replace one character |
| R | Replace many characters |
To delete you must you the commands: d or x. It must be combined with a movement command. Following are some command examples:
| x | Delete character to the right of cursor |
| X | Delete character to the left of cursor |
| D or d$ | Delete to the end of the line |
| dd | Delete current line |
| :d | Delete current line |
| dw | Deletes a word |
| 5dd | Delete 5 lines |
| 4x | Delete 4 characters |