码迷,mamicode.com
首页 > 系统相关 > 详细

linux command intro2 vi

时间:2015-08-15 22:46:00      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:

vi

cusor :

0 : to the beginning of the current line

$ : to the end of the current line

G : to the last of the file

gg :   to the beginning of the file

Delete:

dd : delete the current line

dG :from the current line to the end of the file

d20G: from the current line tot the 20th line of the file

d$ :From the current cursor location to the end of the current line

d : also used to cut data

y : use to copy data

p : used to paste data

yy: copy the current line

 

:%s/Line/line/g

%  Specifies the range of lines for the operation. %is a shortcut
meaning from the first line to the last line.

s  Specifies the operation—in this case, substitution (search and
replace).

/Line/line/ The search pattern and the replacement text.

g  This means global

linux command intro2 vi

标签:

原文地址:http://www.cnblogs.com/huaxiaoyao/p/4733236.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!