Insert Commands

Command

Action

a

Append after cursor.

A

Append to end of line.

c

Begin change operation.

C

Change to end of line.

gI

Insert at beginning of line. {vim}

i

Insert before cursor.

I

Insert at beginning of line.

o

Open a line below cursor.

O

Open a line above cursor.

R

Begin overwriting text.

s

Substitute a character.

S

Substitute entire line.

ESC

Terminate insert mode.

The following commands work in insert mode.

Command

Action

Backspace

Delete previous character.

Delete

Delete current character.

Tab

Insert a tab.

Ctrl-A

Repeat last insertion. {vim}

Ctrl-D

Shift line left to previous shift width. {vim}

Ctrl-E

Insert character found just below cursor. {vim}

Ctrl-H

Delete previous character (same as Backspace).

Ctrl-I

Insert a tab.

Ctrl-K

Begin insertion of multi-keystroke character.

Ctrl-N

Insert next completion of the pattern to the left of the cursor. {vim}

Ctrl-P

Insert previous completion of the pattern to the left of the cursor. {vim}

Ctrl-T

Shift line right to next shift width. {vim}

Ctrl-U

Delete current line.

Ctrl-V

Insert next character verbatim.

Ctrl-W

Delete previous word.

Ctrl-Y

Insert character found just above cursor. {vim}

Ctrl-[

(Escape) Terminate insert mode.

Some of the control characters listed in the previous table are set by stty. Your terminal settings may differ.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.