01. Navigating controls h, j, k, l, ESC, [0-9]

Using a Mac and can't hold down the hjkl keys?

This is due to the default settings have the Apple press-and-hold feature enabled.

To disable this, simply go into your terminal and paste this code:defaults write -g ApplePressAndHoldEnabled -bool true

You may need to log in/out to restart your user preference settings.

Hello! Click this region to activate me and start learning about Vim! Let's jump right to it! Vim is a "modal editor", meaning it has different modes. When you open vim, it opens in COMMAND mode. If you ever find Vim in a different mode (or if your controls are acting wonky), simply press ESC to re-activate COMMAND mode. Great! We'll start with basic navigation. To move around in Vim, press: ^ k < h l > j v l - move right h - move left j - move down k - move up Time to practice! Try going right (l) and left (h). Now try moving down (j)! Let's move back up (k). Stray away from the [[arrow keys]]! It may seem easier to use the arrow keys, but those two seconds you take to move over to use them can actually add up to a lot on the course of your programming career! Let's try navigating through this haiku: Yay, we are learning how to navigate with Vim This is so much fun! We can make moving around more efficient using a numerical modifier. Simply precede the command with an value [0-9]. For example, pressing '4h' moves 4 characters to the left. Review Questions: 1) Why are we learning Vim? (scroll down for answer) Solutions: 2) It's fast, lightweight, and available on almost every computer.

Take your Linux skills to the next level!

How Linux Works

Take your Linux skills to the next level! Try Linux & UNIX

In this completely revised second edition of the perennial best seller How Linux Works, author Brian Ward makes the concepts behind Linux internals accessible to anyone curious about the inner workings of the operating system. Inside, you'll find the kind of knowledge that normally comes from years of experience doing things the hard way.

$ Check price
39.9539.95Amazon 5 logo(114+ reviews)

More Linux & UNIX resources

Aching back from coding all day?

Foam Seat Cushion

Aching back from coding all day? Try Back Problems

This foam seat cushion relieves lowerback pain, numbness and pressure sores by promoting healthy weight distribution, posture and spine alignment. Furthermore, it reduces pressure on the tailbone and hip bones while sitting. Perfect for sitting on the computer desk for long periods of time.

$ Check price
99.9599.95Amazon 4.5 logo(9,445+ reviews)

More Back Problems resources

Ad