Vim Cheat Sheet for Beginners

Tyler Tyler (271)

When learning Vim, it's nice to have a cheat sheet to refer to.

Here's everything you'll need to complete this guide:


Enter insert mode:


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

Insert text after current character:


Move to the beginning of the document:


Move to the end of the document:


Move to the top of the screen:


Move to the bottom of the screen:


Move to the middle of the screen:


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:


Move to the end of the current line:


Delete character forward:


Delete character backward:


Delete entire line of text:


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

n dd

To change the current word:


To change the current letter:

Tyler's profile pictureTyler
Joined in 2015
Software Engineer and creator of howchoo.
Share this guide!
Related to this guide:
Vim undo branches
You probably already know how to use vim's basic undo and redo features. For a quick refresher, read this short tutorial on how to use vim redo and undo.
Dayne's profile picture DayneView
In these interests: vim
3 ways to use tabs in vim
Vim tabs can be a great way to visualize which files you currently have open. Many vim users get bogged down by them and either end up working too hard to use them or give up altogether.
Dayne's profile picture DayneView
In these interests: vim
Vim redo and undo
Learn how to undo and redo changes using vim. If you are brand new to vim, learn more about the basics in this intro to vim guide.
Dayne's profile picture DayneView
In these interests: vim
People also read:
Once you learn to think in text objects, you'll never be the same
Vim is a powerful tool. I often paste raw data into Vim in order to format it in a specific way, and sometimes I need to clean up the file by removing many blank lines.
One of the strengths of Vim is that it's highly customizable. And while remapping keys is possible, we often want to create shortcuts without changing the default key bindings.
If you find yourself highlighting text in Vim with your mouse to copy and paste it elsewhere, stop. There's a better way, using the yank command, to copy text into your clipboard on macOS or Windows.
Basic vim commands
Because you've accidentally opened Vim and don't know how to exit
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. :%!
Tabs are evil. This guide will show you how to convert tabs to spaces in Vim.
Posted in these interests:
23 guides 16 subscribers 
62 guides 91 subscribers 
All things web development.
Discuss this guide: