Vim Recall繁體中文

Change the square brackets and their contents

ca[

Example

Normal 0 / 4
list[one, two] tail
Cursor on line 1, column 9

Change the range selected by a[.

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
- Small delete register
CharacterwiseEmpty
· space ⇥ tab ↵ line break
Before & after
Before
list[one, two] tail
Cursor on line 1, column 9

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
- Small delete register
CharacterwiseEmpty
· space ⇥ tab ↵ line break
After
listgreen tail
Cursor on line 1, column 9

Vim registers

" Unnamed register Changed
Characterwise · Uses Small delete register[one,·two]
- Small delete register Changed
Characterwise[one,·two]
· space ⇥ tab ↵ line break

Start in Normal mode, at line 1, column 9 (one-based). Change the square brackets and their contents. This enters Insert mode; the example types green and then Escape. Press ca[. The demonstrated replacement is green; finish it with Escape.

Details & Vim help

Example replayed in Vim

Change the range selected by a[.

Change the square brackets and their contents. This enters Insert mode; the example types green and then Escape.