Cursor Movement Commands



The following commands are performed in command mode.
To enter command mode, press the Esc key.



How to move the cursor.


There are 40 some ways to move the cursor in the vi text editor.
These are the keys I use the most.
    h    Move Left   
    j    Move Down   
    k    Move Up     
    l    Move Right  
NOTE: Using the letter keys to move may seem strange at first but,
after you get use to it, you will wonder why anyone would ever use the arrow keys.
    w    Move Forward  one word    
    b    Move Backward one word    
    
    0    Move to the Beginning of the Line       (the number zero)
    $    Move to the End of the Line          

    CTRL-F    Move One Screen Forward    
    CTRL-B    Move One Screen Backward   

    nG    Move to a given Line Number  (n is the line number to move to)
    G     Move to the Last line          


You can also MARK the text and move back and forth between the marked areas.


Back to main VI page