Moving Around in vi

Many cursor commands in vi enable you to move to different parts of the screen or the file you are editing. First, it’s necessary to go over how to count words, which is useful for moving, deleting, and replacing text.

Using Separated Words Versus Contained Words Versus Non-Words

Separated words (or space-delimited/delineated words) are any groups of characters separated by one or more spaces, tabs, or ends of lines. Contained words are any groups of letters or digits separated by punctuation, spaces, tabs, or ends of lines. The W command moves to the next space-separated word. The w command moves forward by contained words and non-words.

In the following example, if the cursor is at the start of the line, you can get to ...

Get Practical UNIX now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.