Vim Recall繁體中文

Following command keeps marks where they are

:lockmarks

Example

Normal 0 / 2
first line
  second line
third line
fourth line
fifth line
Cursor on line 3, column 2

Following command keeps marks where they are.

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
1 Delete register 1
CharacterwiseEmpty
· space ⇥ tab ↵ line break

Local marks

'a
line 2, column 4
'b
line 4, column 3
'.
line 2, column 1

Jump list

Empty
Before & after
Before
first line
  second line
third line
fourth line
fifth line
Cursor on line 3, column 2

Vim registers

" Unnamed register
Characterwise · Uses Yank register 0saved
1 Delete register 1
CharacterwiseEmpty
· space ⇥ tab ↵ line break

Local marks

'a
line 2, column 4
'b
line 4, column 3
'.
line 2, column 1

Jump list

Empty
After
  second line
third line
fourth line
fifth line
Cursor on line 1, column 3

Vim registers

" Unnamed register Changed
Linewise · ↵ marks a line break · Uses Delete register 1first·line↵
1 Delete register 1 Changed
Linewise · ↵ marks a line breakfirst·line↵
· space ⇥ tab ↵ line break

Local marks

'a
line 2, column 4
'b
line 4, column 3
'.
line 1, column 1

Jump list

1 · line 3
column 2

Start in Normal mode.

Details & Vim help

Example replayed in Vim

Following command keeps marks where they are. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :loc[kmarks] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.