标签:code equal save with star down scree character key
Normal modeh //move left by one character
j //move down by one line
k //move up by one line
l //move right by one character
Ctrl + f //Page down
Ctrl + b //Page up
H //move to the first letter of first line in current screen
M //move to the first letter of middle line in current screen
L //move to the first letter of last line in current screen
G //move to the last line of the file
nG //move to the "n" line of the file
gg //move to the first line
n[Enter] //move down by "n" lines
n[Space] //move right by "n" letters
x //delete one character afterwards, equals "Delete" key
X //delete one character forwards, equals "Backspace" key
dd //delete one line
ndd //delete "n" lines afterwards
nyy //copy "n" lines starting from the cursor
p //paste the content starting from next line
P //paste the content before the line of cursor
/word //find the "word" down, can using with "n"(means find next one by pressing "n" one time)
:n1,n2s/word1/word2/g //find the "word1" and replace it with "words" between "n1" and "n2" lines
:1,$s/word1/word2/g //find all the "word1" and replace them with "words" of file
:w [filename] //save as file to filename
:r [filename] //read data and insert the content after the current line of cursor
:n1,n2 w [filename] //save the content to filename file from "n1" to "n2"
:! command //leave vim temporary to execute command
:set nu
:set nonu
v //characters select, will select all the characters which cousor goes by
V //line select
Ctrl + v //block select
y //copy the selected content
d //delete the selected content
r //block content replace
I //insert content before block
A //insert content after block
:n //edit next file
:N //edit former file
:files //list all edited files
:sp [filename] //add filename(will open the file in another windown); or just :sp will open the same file in another window
Ctrl + w + j //first press Ctrl + w, then release Ctrl and w, then press j to navigate to below window
Ctrl + w + k //first press Ctrl + w, the release both, then press k to navigate to above window
标签:code equal save with star down scree character key
原文地址:http://blog.51cto.com/taoismli/2134306