#print Basic Movement - Small movements The next few lessons will cover the basic movement commands, allowing you to move around in a file. In this lesson we'll talk about moving small distances, such as up and down a line, forward a character, etc. Moving up and down a line is accomplished with the - command (to go up) and the return key (to go down). Going forward and backward is done with the space bar (for going forward) and the backspace key (for going backward). If your terminal has arrow keys, you can also use them to move around in the appropriate directions. As a last resort you can even use the h, j, k and l keys just like arrow keys: k - up h - backward l - forward j - down Now go into vi for practice by typing vi Movement1 There will be instructions. After quitting, type 'ready' to move on. #create Movement1 You can go between lines using minus ('-') to go up and return to go down. You can move forward and backward using the space bar and the backspace key. If your terminal has arrow keys, you can move using them and if not, you can use h, j, k and l as follows: k - up h - backward l - forward j - down Note that 'k' works differently than '-' in that when you use '-', vi always puts you at the first character on the new line. 'k', on the other hand, just moves the cursor straight up, leaving it in the same column if possible. The same difference exists between 'j' and the return key. Try it! When you're done, type :q to leave the editor, and when you see the percent sign type 'ready' to go on to the next lesson. #user #next 2.2 10