Setting and Jumping to Marks

m{a-z} sets a mark. '{a-z} jumps to its line. `{a-z} jumps to its exact spot.

Keys: m{a-z}, '{a-z}, `{a-z}, m{A-Z}

Marks are named bookmarks. Lowercase marks are buffer-local; uppercase marks are global across files.

Marks are persistent bookmarks. ma sets mark a at the cursor. 'a or `a jumps back to it. The whole alphabet is at your disposal โ€” 26 lowercase marks per buffer plus 26 uppercase that work across files.

Set mark a at cursor
KeyNote
m
a
Jump to line of mark a
KeyNote
'
a
Jump to exact position of mark a
KeyNote
`
a
Set global mark A (works across files)
KeyNote
m
A
ma โ€” set a mark
'a โ€” jump to mark line
`a โ€” jump to exact mark
Global marks (mA)

Reference

Key Action
m{a} Set lowercase mark (local)
m{A} Set uppercase mark (global)
'{a} Jump to line of mark
`{a} Jump to exact position of mark
:marks List all marks
:delm {a} Delete a mark

Worked example โ€” ma and 'a

Set a mark, jump back later.

Step 1 ยท
marks.set-jump
Step 2 ยท ma ยท ma โ€” mark 'a' set at this line.
ma โ€” mark 'a' set at this line.
Step 3 ยท 2j ยท Wandered to chapter two.
Wandered to chapter two.
Step 4 ยท 'a ยท 'a โ€” jumped back to mark 'a'.
'a โ€” jumped back to mark 'a'.

Lowercase marks are file-local; uppercase marks are global (jump across files).

โ–ถ Try this in the simulator

See also: Special Marks, Tick vs Backtick, The Jump List