标签:
vi 编辑命令
1.vi [file_name]
2.h、j、k、l
3.Ctrl+f
4.Ctrl+b
5.Ctrl+d
6.Ctrl+u
7.n+
8.0/Home
9.$/End
10.H
11.M
12.L
13.G
14.nG
15.gg
16.n+ / n[ENTER]
-----------------查找/替换-------------------------------------------
17./[word]
18.?[word]
19.n
20.N
21.:n1,n2s/[char]/[char]/g
21.:1,$s/[char]/[char]/g //在第一行到最后一行替换
-----------------删除-------------------------------------------
22.x
23.X
24[n]x/[n]X
25.dd
26.[n]dd
27.d1G
28.dG
29.d$
30.d0
-----------------复制/粘贴-------------------------------------------
31.yy
32.[n]yy
33.y1G
34.yG
35.y0
36.y$
37.p
38.P
39.J
40.u
41.Ctrl+r
42. . //重复上一个操作
43.:setnu
44.:set nonu
45.:w
46.:w!
47.:wq
48.:wq!
49.q:
50.:q!
51.:e!
标签:
原文地址:http://blog.csdn.net/shubingzhuoxue/article/details/46605477