【linux】vi常用指令

來源:互聯網
上載者:User

標籤:strong   資料   sp   on   c   linux   bs   r   word   

0或者"Home”鍵:游標轉移到此段的最前面位元組處。

$或者"End"鍵:游標轉移到此段的最後面位元組處

n<space>:游標向後移動n個位元組。

n<enter>:游標向下移動n行。

gg:游標移動到檔案第一行。

GG:游標移動到檔案最後一行。

nG:游標移動到檔案的第n行。

/word:向下尋找word

?word:向上尋找word

n:向下搜尋

N:向上搜尋

dd:刪除游標所在的一行。

ndd:刪除游標以下的n行。

yy:複製游標所在的行。

nyy:複製游標以下的n行。

p:將複製的資料在游標所在的下一行貼上

u:撤銷

<ctrl>+r:恢複

w:儲存

w!:強制儲存

q:離開

q!:強制離開

:set nu :顯示行號

:set nonu:取消顯示行號

 

【linux】vi常用指令

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.