linux學習之vim編輯器

來源:互聯網
上載者:User

標籤:linux   字串   編輯器   

  1. 下翻一頁:page down

  2. 上翻一頁:page up

  3. 到行首:home

  4. 到行尾:end

  5. 移動到檔案尾:G

  6. 移動到檔案頭:gg

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

  8. 在下面插入新的一行:o

  9. 在上面插入新的一行:O

  1. 向下搜尋word字串:/word

  2. 再按n:向下搜尋

  3. 再按N: 向上搜尋

  4. 在n1與n2行之間搜尋word1,並用word2取代::n1,n2s/word1/word2/g

  5. 在第一行到最後一行之間搜尋word1,並用word2取代::1,$s/word1/word2/g

  1. 刪除後一個字元:x

  2. 刪除前一個字元:X

  3. 刪除一行:dd

  4. 複製一行:yy

  5. 粘貼到下一行:p

  6. 粘貼到上一行:P

  1. U或u:還原

  2. 另存新檔::w [filename]

  3. 設定行號:set nu

  4. 取消行號:set nonu

Visual Block區塊選擇

  1. v:字元選擇

  2. V:行選擇

  3. ctrl+v:區塊選擇

  4. y:將反白的地方複製

  5. p:將反白的地方粘貼

  6. d:將反白的地方刪除

linux學習之vim編輯器

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.