Moving around in Vim

Mike Hartington
InstructorMike Hartington

Share this video with your friends

Send Tweet
Published 6 years ago
Updated a year ago

Learn how to efficiently move around Vim and stop reaching for your mouse

[00:00] Navigating around a file in Vim is driven solely by the keyword. Where most editors use the arrow keys and your mouse, Vim use the H, J, K, and the L keys. These keys are preferred since they keep your hands right on the home row instead of reaching constantly for your mouse.

[00:20] To move down a file, you can use the J key. To move back up a file, you can use the K key. If you want to move to the right, you can use the L key. If you want to move to the left, you can use the H key. Vim also provides a way to move through text word by word, using the W key. If you want to go back word by word, you can use the B key.

[00:46] To sum up, H moves you left one letter. L moves you right one letter. J moves you down one line. K moves you up one line. W moves you forward one word. B moves you back one word.