Learn Vim

Vim is a text editor that’s built into every Mac and Linux computer by default and easily installed on Windows. It is an extremely powerful and efficient text editor for coding but can be intimidating and confusing for anyone new to it.

Vim is accessed by the command line and is completely controlled by the keyboard so it can present a seemingly perpendicular learning curve. Fortunately the learning curve only looks unapproachably steep – you can learn the basics in less than an hour. Here are some resources to get started.

Because Vim is accessed via the command line, make sure to learn how to use the command line first.

Learn Enough Text Editor to Be Dangerous

This course featured in our list of ways to learn text editors because it teaches you how to use the Atom text editor. However the first chapter is a highly approachable – and free – introduction to using Vim and so that’s why it’s included at the top of our list here too.

One of the most important things this tutorial will teach you is how to quit Vim. The importance of this should not be underestimated. It’s far from intuitive for most of us and one of the reasons Vim can seem scary to newcomers is that it is so easy to get stuck in it if you don’t know how to quit.

Vim 101: A Beginner’s Guide to Vim – Linux.com

This one page tutorial goes through the basics of using Vim and is a useful reference to remind you of the most important keyboard commands.

Vim Valley Course

The Vim Valley course is a fun and hands-on way of learning Vim. It uses a sandbox in your web browser so you don’t have to use your own shell (or worry about messing up your computer, which is a common fear if you don’t know what you’re doing).

You are guided through exercises from the absolute basics to slowly building up your mastery of Vim commands and introducing more efficient ways of editing.

VIM Adventures

Vim Adventures teaches you Vim while playing a cute retro styled game.

Because you learn in the context of a game rather than in the Vim interface, there may be a bit of a gap in transferring you’re learning over. So it’s still a good idea to do at least one of the other tutorials listed so you know how the interface works and then use this game to practise your muscle memory for the keyboard commands.

Interactive Vim tutorial

This tutorial provides an interactive sandbox in your web browser (in the shape of a laptop to make it more fun!) to guide you through the basics of using Vim with your keyboard.

A Byte of Vim – Swaroop

(NOTE: link points to a very basic site!)

This is a classic book on Vim that is available free to download as a PDF and is free to share and adapt under a Creative Commons licence.

The first part of this book is meant for new users who want to understand what Vim is and learn how to use it.

The second part of this book is for people who already know how to use Vim and want to learn about features that make Vim so powerful, such as windows and tabs, personal information management, making it a programmer’s editor, how to extend Vim with your own plugins, and more.

Mastering Vim Quickly – Jovica Ilic

This course has the subtitle “From WTF to OMG in no time” and aims to get you working skilfully and efficiently with Vim by teaching you the practices that matter the most, rather than teaching everything.

This course is available in a number of paid tiers. The standard tier includes the course as an ebook, while higher tiers include screencasts.

Vim Tutor

If you already know how to use the command line, go to your shell application (on Mac, the default shell is Terminal) and on the command line prompt, type ‘vimtutor’ like so:

'vimtutor' entered into the command line

You’ll then get access to a tutorial within your shell application:

The vimtutor tutorial in your shell application


Keep going with our 31 Days of Learning. Sign up to our newsletter to keep updated!