Vi command under several confused insert mode

Prior to summarize some common commands Vim Bird Brother listed, because i often used to insert,

So are several other ways due to the insertion less often confusing easy to use, and then again in the form of graphic impression deepened a bit

 

 

I : Before field at the current cursor inserted, i.e. inserted before G
the I : Start insertion (the first non-space character) at the beginning of the current line cursor, i.e., inserted before the A
A : In the current cursor the next character position of the start of insertion, i.e., insertion before. 1
a : start inserting the last character at the current cursor line, i.e. the start inserted after 0
O : start inserting the new current cursor line on the next line line
O : at the current cursor line's begin inserting a new line
r : only replace the cursor one character that once the current
R : text will always replace the cursor until you press Esc so far

 

Also on command due to the replacement string longer be easier to forget:

 

 :30,39s/1w/HAHA/gc

30 represents the first line to the line 39 all the "1w" is replaced with "HAHA", gc denotes asked to confirm each replacement (g confirmation is not required, direct replacement)

Replace Results:

 

Guess you like

Origin www.cnblogs.com/jockeyhao/p/12160674.html