01 / 08
"I want to mend line 50 only"
So far you can open, write and save. But one thing is still beyond you.
I want to mend line 50 of a settings file onlyAs you are, you cannot move off line 1. Open vi and the cursor is always on line 1.
And pressing o fifty times will hardly do.
So you learn to move. What this lesson gives you is this.
move between lines h j k ljump within a line 0 $ w bjump within the file gg G 3GMovement at three sizes.
Why not the arrow keys, you may think. Some vi allow them. But some do not.
an old machinethe connection is poorthe arrows arrive as other charactersAt times like these the arrow keys do nothing. h j k l always work. So it is these you learn.
And once used to them, they are faster.
arrow keys move your hand down to the righth j k l hand stays putYour fingers never leave the home row. No moving your hand for every character.
At the end of this lesson, vi finally becomes "a tool you can use". Without reaching the place you meant, there is no editing.