As I'm using Neovim, I'm noticing my marks are just disappearing mid session. I keep having to define them over and over again. I swear it's got to be a bug, either in Neovim or a plugin I'm using, but I'm curious if there's any possible way to debug this—something along the lines of verbose perhaps. This is getting really annoying.
- 521
- 4
- 15
1 Answers
As far as I'm aware, Vim does not include any features that will help you track down what's causing this issue, so you have two options, neither of which are very appealing.
You can follow statox's advice, and attempt to narrow down what part of your configuration is causing the issue by selectively disabling parts of your vimrc and disabling/removing your plugins systematically. This is a pain for this sort of issue because the fact that it just occurs randomly after a period of time means that it's going to take you ages to track down the problem, and while you are doing so you'll be missing parts of your Vim environment making using it more difficult. Unpleasant.
You can download the Vim source code, set up a dev environment, learn how to debug C code (if you don't already know how to do so) figure out which bits of the Vim source code are run when a mark is removed/reset, set breakpoints on these, and then carry out your normal tasks until the breakpoint is hit. If you're not already a C programmer, this is not really feasible, and even if you are, it's a big task.
Sorry!
- 31,891
- 3
- 72
- 139
-
-
You could also track changes in the info file, where the markers are saved . Possibly some of it gets updated in real-time. – eyal karni Feb 03 '20 at 01:51
-
-
2@eyalkarni Interesting ideas! The viminfo file isn't updated in real time, but you can initiate a write with the
:wviminfocommand, so you could set that up on a timer to get a rough idea of when the marks are being deleted. I'm not sure how you could use profiling to help debug this problem, but I'd be interested to hear your ideas. You should write an answer! – Rich Feb 03 '20 at 09:34
maand global marksmA? – statox Jan 31 '20 at 09:08