In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?



A. By using the command :repeat followed by the number and the command.
B. By specifying the number right in front of a command such as 4l or 2yj.
C. By selecting all affected lines using the shift and cursor keys before applying the command.
D. By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times.

題解

選項A,沒有這樣的用法。

選項B,「4l」表示將游標向右移4格,「2yj」會複製目前游標所在之列開始算起的三行。

選項C,shift加上方向鍵,只會讓游標移動的距離加大。

選項D,沒有「repetition」這個設定選項。