From the course: Learning Vim

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Navigate using keys: H, J, K, L

Navigate using keys: H, J, K, L - vi Tutorial

From the course: Learning Vim

Navigate using keys: H, J, K, L

- [Instructor] Let's open sherlock.txt, vim sherlock.txt. You're in normal mode and at the beginning of the file. To move around, you can use the arrow keys. However, this will force you to move your fingers from the natural typing position. Instead of the arrow keys, you can use the H, J, K, L keys. If you're an old-time gamer, you might recognize these keys. They were used in games to move around, as well. H goes to the left, J goes down, K goes up, and L goes right. It takes some time to get used to it but once you get it, it comes naturally. If you'd like to practice, you can head over to vim-adventures and try the first level. H, J, K, L move one character in each direction. Like many other vim commands, you can prefix them with a number, telling how many times you'd like the command to be executed. Let's move to the beginning of the file and then type 10L. This will move us 10 characters to the right. If you type 6J, this will move you six lines down.

Contents