How do I cycle through all lowercase marks in the current file sequentially?
]'
The ]' command jumps to the start of the line containing the next lowercase mark in the file, while [' jumps to the previous one.
]'
The ]' command jumps to the start of the line containing the next lowercase mark in the file, while [' jumps to the previous one.
' vs `
Vim provides two distinct ways to jump to a mark, and they behave differently: the apostrophe ' jumps to the first non-blank character of the marked line, while
'0
Pressing '0 in normal mode jumps to the exact cursor position in the most recently edited file, even after closing and reopening Vim.
mA to set, 'A to jump
Uppercase marks (A–Z) are global marks — they persist across files and Vim sessions.
'[ and ']
Vim automatically sets two marks whenever you yank, change, delete, or paste text: ` [ ` (backtick-bracket) marks the start of the affected region, and ] ` mark
:lockmarks
Many Ex commands silently adjust or delete marks as a side effect of modifying buffer content.
`a vs 'a
Vim has two ways to jump to marks: backtick (` `) jumps to the exact line AND column, while apostrophe (') jumps to the line only, positioning the cursor at the
:marks
Use :marks to display all current marks with their line numbers, column positions, and file/text.
"a:'a,'by
Set marks with ma and mb, then yank the range between them into register a using "a:'a,'by.
`< and `>
The ` ` marks automatically track the boundaries of the last visual selection.
`[ and `]
The ` [ ` and ] ` marks automatically track the boundaries of the last changed or yanked text.
``
The double backtick jumps to the exact position before the last jump.
`{mark}
The backtick command ` ` followed by a mark name jumps to the exact line and column of that mark, unlike the single-quote ' which only goes to the line.
m{A-Z}
Uppercase marks (A-Z) are global marks that remember both the file and the cursor position.
g;
The g; command moves backward through the change list, jumping to positions where edits were made.
m{a-z} then '{a-z}
Vim marks let you bookmark positions in a file and jump back to them instantly.
qama{edits}'aq
How it works When a macro needs to jump to different parts of the file and then return to a starting position, marks are the perfect tool.
:'a,'b s/old/new/g
Marks can be used as range specifiers in any Ex command.
command-line #marks #command-line #ex-commands #ranges #editing
`[v`]
The ` [v] sequence visually selects the exact region of text that was last changed, pasted, or yanked into the buffer.
visual-mode #editing #visual-mode #marks #paste #productivity
gi
The gi command moves the cursor to the position where you last exited insert mode and immediately enters insert mode again.
navigation #navigation #insert-mode #marks #normal-mode #productivity