Vim Recall繁體中文

Append a semicolon on lines two to four

:2,4normal! A;

Example

Normal 0 / 2
one
two
three
four
five
Cursor on line 1, column 1

Run a Normal-mode edit over an explicit line range.

Before & after
Before
one
two
three
four
five
Cursor on line 1, column 1
After
one
two;
three;
four;
five
Cursor on line 4, column 5

Start in Normal mode, at line 1, column 1 (one-based). The ! on normal prevents mappings from changing A;. Each selected line receives one semicolon. Type :2,4normal! A; and press Enter.

Details & Vim help

Example replayed in Vim

Run a Normal-mode edit over an explicit line range.

The ! on normal prevents mappings from changing A;. Each selected line receives one semicolon.