Vim Cheat Sheet for Beginners

John John (304)
0

When learning Vim, it's nice to have a cheat sheet to refer to. You should also check out our guide on how to get started with Vim.

vim×1

Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.

Enter insert mode:

i

In insert mode, you can type and insert text as you are used to with most other text editors.

Insert text after current character:

a

Move to the beginning of the document:

gg

Move to the end of the document:

G

Move to the top of the screen:

H

Move to the bottom of the screen:

B

Move to the middle of the screen:

M

Move one full screen forwards:

<ctrl> f

Move one full screen backwards:

<ctrl> b

Move one half screen forwards:

<ctrl> d

Move on half screen backwards:

<ctrl> u

Move to the beginning of the current line:

0

Move to the end of the current line:

$

Delete character forward:

x

Delete character backward:

X

Delete entire line of text:

dd

Delete n lines of text (n is any positive integer):

n dd

To change the current word:

cw

To change the current letter:

cl
John John (304)
5 minutes

Vim is amazing. Well, Python is doing all the work, but I still like Vim. Learn how to format JSON in Vim like a pro with this short guide! tl;dr Paste your json, and run this in vim normal mode. :%!