linux command intro2 vi

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

posted on 2015-08-15 22:10  tneduts  阅读(213)  评论(0编辑  收藏  举报

导航