I'm using SpaceVim with Neovim, and often times I'd experience this cursor jumping issue (as if
^ has been pressed in normal mode) while using it. I doubt the bug is on the Neovim end, otherwise a lot more people definitely would've raised it by now.
An issue has already been opened in SpaceVim about it: https://github.com/SpaceVim/SpaceVim/issues/3159
However we don't know how to reproduce it.
I've personally notice it occurring most often while:
navigating a line with
e; and when that becomes the case, doing something like
cwbecomes extremely annoying as it ends up jumping the cursor to the first non-blank character of the line and changing that instead of the actual word I wanted
while saving the file with either the normal Vim command of
:wor the SpaceVim keybinding of
Space f s; thereby it doesn't appear those specific keybindings are the problem. And when this misbehavior is activated, this jumping to the line start reliably occurs on every subsequent saves
It also appears to happen regardless of the filetypes (for myself those are most often:
The only "workaround" I found is to activate another buffer by switching to it, either by just opening it if it's hidden, or switching to buffers in other tabs, or even opening a split (a help split works) in the same tab. This will suppress the problem for some time, could be for a long while, but also could happen again soon after a few more line navigations.
At this point I'm not even quite sure how to go about to diagnose this bug. The submitter already went and disabled many of the layers (and thereby most of the plugins), and he claims it still occurs. Is it caused by some
autocmds perhaps? But that also seems dubious since it occurs very unpredictably while just navigating. Also the fact that switching to another buffer then switching back temporarily suppresses the problem leads me to think that maybe there's some buffer state variable/property that gets reset every time you exit and enter it?
Any ideas on how to proceed on fixing this is appreciated.