next up previous contents
Next: Searching and Replacing Up: Selecting Text, Cutting and Previous: Visual Mode   Contents

Using Named Registers

By using the multiple named registers, you can hang on to whatever you copy and yank. Select one using the quote ('') as follows: ''ad{ means ``delete into named register `a' all the text back to the beginning of the paragraph.'' If you forget what you've stored in the registers, the Ex command :registers will show them all.

Using both marks and registers in a single command means you mustn't mix up your ' and '' characters: the former is for marks and the latter for registers. So, ''ay'b means ``Yank from the cursor's position to mark `b', and store it in register `a.' ''

Finally, you can place the contents of any register with the put command (p). For example, ''hp will put the contents of register `h' under the cursor, beginning on a new line (a capital P will place it on a new line above the cursor).

Figure 9: Cutting and Pasting
\em Command & \em Key \\
...& y \\
Put/Paste below, above cursor
& p,P \\
\end{tabular} \end{figure}

Randall Wood 2009-08-04