me instead of
'e and the mark "e" got overwritten with the current position, instead of jumping to it. How do I undo it?
:delmarks e will delete a specific mark. It can be abbreviated
From the wiki:
Command Description :delmarks a delete mark a :delmarks a-d delete marks a, b, c, d :delmarks abxy delete marks a, b, x, y :delmarks aA delete marks a, A :delmarks! delete all lowercase marks for the current buffer (a-z)
To address your comment:
In order to save a history of your marks, you need to write a viminfo file using
The viminfo file is used to store:
- The command line history.
- The search string history.
- The input-line history.
- Contents of non-empty registers.
- Marks for several files.
- File marks, pointing to locations in files.
- Last search/substitute pattern (for 'n' and '&').
- The buffer list.
- Global variables.
This can be read back with
There is a big caveat to using an
viminfo file to store your marks. It will only store uppercase or numerical marks. Not lowercase marks.
Lowercase marks 'a to 'z are remembered as long as the file remains in the buffer list. If you remove the file from the buffer list, all its marks are lost. If you delete a line that contains a mark, that mark is erased.