`:delmarks` does not permanently delete marks
bruhtus opened this issue · 11 comments
AFAIK, there's still a problem with :delmarks
that doesn't really delete the mark which you can see here: neovim/neovim#4295.
So, I want to ask, is the :delmarks
bug already been fix or did you use another approach to hide the deleted marks in sign column?
If it's already been fixed, then that's good. If it's not, maybe you should give an information about that to prevent someone creating an issue that's not related to the plugin.
Thank you.
No, this bug still exists, and is definitely quite annoying. If i have some free time I may try my hand at fixing it.
The main issue is that :delmarks
will delete the marks in your current neovim session, but will not write the changes to the shada file, meaning that the deleted marks will re-appear the next time you open the file with neovim.
there are two workarounds that I’m aware of:
- Set your shada file to not serialize mark information, so lowercase marks are lost after quitting vim.
- Use the ‘force_write_shada’ flag in the setup function, which overwrites the shada file after mark deletion. Be careful when setting this! It could cause you to lose information.
No, this bug still exists, and is definitely quite annoying. If i have some free time I may try my hand at fixing it.
I see, I thought the bug already been fixed. Yeah this bug is quite annoying for the user who use mark often.
I think the main problem is in the mechanism of shada file, I recently saw tpope open issue about "Global variable added to shada can never be removed". That's quite a tricky issue there.
Alright, I just want to make sure if the bug already been fixed or not (currently I'm on stable branch after all) and I suggest you to put an info somewhere in readme so that the new user know that this was not your plugin bug but more of a neovim bug. Thank you!
Going to leave this open as a tracking issue, until I (or someone else) finds the motivation to fix this in Neovim.
Even if I set force_write_shada = true, there is still a small problem, and this dm<space> command can sometimes be deleted and sometimes cannot be deleted. But dm[ - or a - z ...] command is running normally
Even if I set force_write_shada = true, there is still a small problem, and this dm command can sometimes be deleted and sometimes cannot be deleted. But dm[ - or a - z ...] command is running normally
nnoremap dm<space> :delm! . It can temporarily relieve the above problems.
Hopefully soon they will solve that shada problem, the use of brands helps developers a lot and having to delete all the marks to remove just one does not seem quite good to me, I love this plugin, so I do not place double marks or I am constantly opening: marks
fyi: for those that are following this issue, I have a pr in the works (neovim/neovim#16067) that will resolve this issue. Please follow that PR if you want to track its progress.
This issue has been resolved by neovim/neovim#24936 (comment), so closing.
in which version this solution will be added?
@Cris-lml007 neovim/neovim#24936 is part of the (Neovim) 0.10 milestone, which has a due date of April 01, 2024.
That means force_write_shada
is no longer necessary, right?
EDIT: never mind, I'm on 0.9.5 which does not have the fix. So I still need it.