Delete Around, or change Inside
Vim ' s text objects fall into II categories:those that interact with pairs of delimiters, such as i), I ", and it, and Those that interact with chunks of text, such as words, sentences, and paragraphs.
The text object in Vim can be divided into two kinds, one is the delimited like I in Tip51, I ", it and so on, the other is the text block, such as words, sentences, paragraphs.
The IW contains the current word from the first character to the last character, and AW also contains the current word from the first character to the last character, but also contains a space space before or after the current word.
daw
The command can be divided into two parts, which d
means delete, aw
select the word at the current cursor and a space before or after it, or daw
delete the word with the current cursor and a space.
ciw
Commands can be divided into two parts, c
indicating changes, iw
selecting the current cursor is the word, change the caw
current cursor is the word, enter the insert
mode, enter most
, complete the change.
We could say that the d{motion}
command tends to work well with Aw, as, and AP, whereas the c{motion}
command works Bett Er with iw and similar.
In general, commands are often followed with commands, followed by commands d{motion}
aw,as,ap
c{motion}
iw,is,ip
.
[Practical.vim (2012.9)]. DREW.NEIL.TIP52 Study Summary