如果到網上搜,有的結果集太大,有的太小。下麵我自己總結的,相對適中。以這個為基礎,不夠了再添加新的,會越來越接近vim熟手。
有什麽用?絕大部分的服務器上用得著,vim或vi是最基本的編輯器。
The following are some useful vim commands:
after pressing esc key,
x: delete a char
dd: delete a line
3 dd: delete 3 lines
u: undo
o: open a new line below
O: open a new line above
yy: to copy a line
p: paste below
P: paste above
3yy: copy 3 lines
0: jump to the beginning of current line
$: jump to the end of current line
j: up
k: down
h: left
l: right
fw: find letter "w" in current line
rw: replace current letter with "w"
i: insert
a: append
w: jump to next word
dw: delete a word
d$: delete to end of line
ctrl+r: redo, the opposite of u (undo)
7G: jump to line 7
gg: go to top
G: go to bottom
find "abc":
/abc, followed by enter, followed by n for "next"