#print More Movement - Words and Sentences Actually, vi knows about much more than just characters and lines in files. It has a concept of words and sentences. Vi defines a word in one of two ways: 1) Letters, digits and '_' surrounded by spaces or punctuation 2) Any characters at all, surrounded by spaces Both definitions have their uses and vi has two parallel sets of commands for dealing with them. In the list below, the lower-case commands use the first definition and the upper-case ones use the second one. w W = Move the cursor forward one word. b B = Move the cursor backward one word. e E = Move the cursor to the end of the current word or, if already there, to the end of the next word forward. For sentences, vi uses ')' to move forward one sentence and '(' to move backward one sentence. Type 'ready' now to try out the word and sentence commands. #user #create Words Vi defines a word in one of two ways: 1) Letters, digits and '_' surrounded by spaces or punctuation 2) Any characters at all, surrounded by spaces In the list below, the lower-case commands use the first definition and the upper-case ones use the second one. w W = Move the cursor forward one word. b B = Move the cursor backward one word. e E = Move the cursor to the end of the current word or, if already there, to the end of the next word forward. For sentences, vi uses ')' to move forward one sentence and '(' to move backward one sentence. ---------------------------------------------------------------------------- # cat /usr/lib/learn/vi/longtext >> Words vi Words #next 4.2 10