|< Day Day Up >|
Many vim commands operate on a block of text ranging from one character to many paragraphs. You specify the size of a block of text with a Unit of Measure. You can specify multiple Units of Measure by preceding a Unit of Measure with a Repeat Factor (page 187). This section defines the various Units of Measure.
A character is one character visible or not, printable or not including SPACEs and TABs. Some examples of characters are
a q A . 5 R - > TAB SPACE
A word, similar to an ordinary word in the English language, is a string of one or more characters bounded on both sides by any combination of one or more of the following elements: a punctuation mark, SPACE, TAB, numeral, or NEWLINE. In addition, vim considers each group of punctuation marks to be a word (Table 6-8).
A blank-delimited word is the same as a word but includes adjacent punctuation. Blank-delimited words are separated by one or more of the following elements: a SPACE, TAB, or NEWLINE (Table 6-9).
A line is a string of characters bounded by NEWLINEs that is not necessarily displayed as a single physical line on the screen. You can enter a very long single (logical) line that wraps around (continues on the next physical line) several times or disappears off the right edge of the display. It is a good idea to avoid long logical lines by terminating lines with a RETURN before they reach the right side of the screen. Terminating lines in this manner ensures that each physical line contains one logical line and avoids confusion when you edit and format text. Some commands do not appear to work properly on physical lines that are longer than the width of the screen. For example, with the cursor on a long logical line that wraps around several physical lines, pressing RETURN once appears to move the cursor down more than one line. You can use fmt (page 664) to break long logical lines into shorter ones.
A sentence is an English sentence or the equivalent. A sentence starts at the end of the previous sentence and ends with a period, exclamation point, or question mark, followed by two SPACEs or a NEWLINE (Table 6-10).
A paragraph is preceded and followed by one or more blank lines. A blank line is composed of two NEWLINE characters in a row (Table 6-11).
Under vim, a screen or terminal emulator window can display one or more logical windows of information. A window displays all or part of a Work buffer. Figure 6-5 on page 145 shows a screen with two windows.
A number that precedes a Unit of Measure (page 184) is a Repeat Factor. Just as the 5 in 5 inches causes you to consider 5 inches as a single Unit of Measure, so a Repeat Factor causes vim to group more than one Unit of Measure and consider it as a single Unit of Measure. For example, the command w moves the cursor forward 1 word, the command 5w moves it forward 5 words, and the command 250w moves it forward 250 words. If you do not specify a Repeat Factor, vim assumes a Repeat Factor of 1. If the Repeat Factor would move the cursor past the end of the file, the cursor is left at the end of the file.
|< Day Day Up >|