Vim

Vim 是 Vi 的進階版

Cheat Sheet

Vim 模式

ModeDescriptionHow to Enter
Normal Mode正常模式,平常進來也是這個模式其他模式按 Esc 或 Ctrl + [
Insert Mode編輯模式,也就是平常要輸入的時候會使用的模式Normal Mode 按 i
Replace Mode取代模式Normal Mode 按 R
Visual Mode視覺標記模式,就很像平常用滑鼠選取文字一樣Normal Mode 按 v
Visual Line Mode視覺整行標記模式,同 Visual Mode,差別它是以行為單位Normal Mode 按 V
apt-get update && apt-get install vim -y
KeyAction
ejump to the end of a word
0jump to the start of the line
^jump to the start word of the line
$jump to the end of the line
{jump to previous para`graph
}jump to next paragraph
gggo to the first line of the document
Ggo to the last line of the document
/pattern     search forward for pattern
?pattern     search backward
n            repeat forward search
N            repeat backward
yy  copy a line
p   paste the clipboard after cursor
x   delete character
D   delete to the end of the line
dd  delete a line
gg then dG
u       undo
Ctrl+r  redo
i   insert before the cursor
A   insert at the end of the line
o   append a new line below the current line    
v   start visual mode
V   start linewise visual mode

>   shift text right
<   shift text left

VIM as IDE

.vimrc 設定:

參考網頁:

Tree 外掛

Vundle: