- 论坛徽章:
- 0
|
2.2.4 Movement by Text Blocks
You can also move the cursor by blocks of text: words,
sentences, paragraphs, etc. The w command moves the cursor
forward one word at a time, counting symbols and punctuation as
equivalent to words. The line below shows cursor movement by w:
cursor, delete lines, insert characters,
You can also move by word, not counting symbols and punctuation,
using the W command. (You can think of this as a "large" or "capital"
Word.)
Cursor movement using W looks like this:
cursor, delete lines, insert characters,
To move backward by word, use the b command. Capital B allows
you to move backward by word, not counting punctuation.
As mentioned previously, movement commands take numeric
arguments; so, with either the w or b commands you can multiply
the movement with numbers. 2w moves forward two words; 5B
moves back five words, not counting punctuation.
We'll discuss movement by sentences and by paragraphs in Chapter
3. For now, practice using the cursor movement commands that you
know, combining them with numeric multipliers.
2.3 Simple Edits
When you enter text in your file, it is rarely perfect. You find typos
or want to improve on a phrase; sometimes your program has a
bug. Once you enter text, you have to be able to change it, delete
it, move it, or copy it. Figure 2.3 shows the kinds of edits you might
want to make to a file. The edits are indicated by proofreading
marks.
Figure 2.3. Proofreading edits |
|