Marks in Neovim can be used to (who would’ve guessed) mark lines in
your project and easily jump between them. They come in handy when the
alternate file "C-6" is not enough.
A mark can be set in normal mode with m<key>
and removed with dm<key >
. You can then jump
back to it at any time with '<key>
. Lower case
marks are local to the file, while upper case marks work globally
across files. See :help marks
for all the details!
The :marks
command can be used to list all marks
but i would suggest using a plugin like marks.nvim to get a better visualization in the signcolumn.
marks.nvim also provides several useful commands, such as :MarksListAll
, which opens the quickfix list showing all active marks in the
project, both local and global.