[LPIC-1]GNU and Unix Commands 24


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」這個設定選項。

關於作者

Magic Len

各位好,我是Magic Len,是這網站的管理員。我是台灣台中大肚山上人,畢業於台中高工資訊科和台灣科技大學資訊工程系,曾在桃機航警局服役。我熱愛自然也熱愛科學,喜歡和別人分享自己的知識與經驗。如果你有興趣認識我,可以加我的Facebook,並且請註明是從MagicLen來的。

相關文章