[1] about vi basic

1  vi  3 mode  and  swap

2 vi copy  paste

3 vi save quit

 

vi is a edit tools

vi's 3 mode

1 cli mode    can not edit

2 insert mode    a i o  can inter  insert mode    

a is  append. You can input somewords  begin current place

i is insert. inoput some words at current place

o is open  input a new line,then input somewords at here

 

ESC  quit vi  edit stauts

esc and  :! command :   close vi  check  with command  ,when you  check finish, but you can inter vi to edit current filer

 

 

:q   quit vi  but no save (if  you changed,the command is vaild )

:q! quit vi but no save (force quit.)

:w   save vi but not quit 

:x exit   vi and save   equal  :wq 

:w File   save as another File

:r File  read file to  current place 

 

 3 last lines mode

 

 

vi copy paste

[N]dd  cut   n lines

[N]yy  copy n lines

p or P  copy  a message to current place

p  copy to current down line

P copy to current up line

 

u  undo

 

[N]x   cut  n bit charter

 

posted @ 2019-07-20 14:36  科学小怪癖  阅读(153)  评论(0)    收藏  举报