必要知識:
1. 你要是已經安裝了vim? 可以通知在 shell中輸入 command -v vim 來查看是否已經安裝。如果未有安裝,則需要手機安裝(合適版本的)vim。
2. 檢查自己正在用的Linux發行版本:cat /etc/os-release 後,選擇合適的版本來安裝。
3. Debian系統(包括Ubentu)安裝方法為 apt install vim
Normal Mode常用指令
Shift A: 進入編輯模式並將cursor置於行末
0 the beginning of the line
$ the end of line
Delete a character: x
Delete a entire row: dd
Undo: u
gg -> to the very beginning of the file
G -> to the very end of the file
: 進入Command Mode
! 執行 linux指令
:q 離開,所有修改內容(如有)不儲存。
:s 儲存修改內容並結束編輯。
i 進入編輯模式 Insert Mode
Concept of buffers
bp
bn
enew