How do I set a mark and jump back to it later?
m{a-z} then '{a-z}
Vim marks let you bookmark positions in a file and jump back to them instantly.
10 results for "set mark ma"
m{a-z} then '{a-z}
Vim marks let you bookmark positions in a file and jump back to them instantly.
ma and 'a
The ma command sets a mark named a at the current cursor position.
mA to set, 'A to jump
Uppercase marks (A–Z) are global marks — they persist across files and Vim sessions.
]'
The ]' command jumps to the start of the line containing the next lowercase mark in the file, while [' jumps to the previous one.
mA / 'A
Uppercase marks (A-Z) are global marks — they remember not only the line and column position, but also the file where they were set.
navigation #navigation #marks #normal-mode #buffers #productivity
` vs '
Vim offers two ways to jump to a mark, and the difference is crucial: the backtick (` `) jumps to the exact line and column where the mark was set, while the si
m{A-Z}
Uppercase marks (A-Z) are global marks that remember both the file and the cursor position.
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
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