Closed Flurrywinde closed 7 years ago
That sounds both very annoying and somewhat puzzling, as ~the only mapping vim-stay ever comes near to is gf
~vim-stay never maps anything. Could you point me to the Vimviki repo so I can take a peek at its code?
https://github.com/vimwiki/vimwiki
And here's the link to my issue about this over there: https://github.com/vimwiki/vimwiki/issues/341
Note: In my original post, I didn't put put <cr>
in backticks, so it wasn't showing up. Going to fix this now.
This is most unlikely to be due to mapping conflicts as vim-stay doesn’t touch mappings (I was thinking of vim-fetch when I stated otherwise above). I’ll have a look at the vimviki source and see if I can find anything…
@Flurrywinde could you tell me what your viewoptions
are set to (echo &viewoptions
)?
folds,options,cursor
Tentatively, I would say the inclusion of options
is the culprit. To test this, please
viewoptions
to the recommended default in your vimrc: set viewoptions=cursor,folds,slash,unix
.:CleanViewdir!
.This worked. I guess I must have somehow missed the viewoptions
recommended default when I installed vim-stay. Sorry about that! Thanks so much for the help.
Storing options in the file state causes no end of hurt, and yeah, you are not the first user not to mind the defaults ;). I have an update for vim-stay on the back burner that will mandatorily remove options
when saving views, but I have no idea when I will get around to finalize that (life has found ways to keep me from coding for quite a while).
Vimwiki maps
<cr>
, backspace, etc to its own functions, but it allows you to override this behavior by usinghasmapto
. (EDIT: What I mean is the vimwiki.vim script useshasmapto
, not that the user himself uses it, in case that wasn't clear.) If hasmapto sees that a mapping already exists (like if you mapped<cr>
to something else in your .vimrc), then it won't commandeer it.However, for some reason, this stops happening when vim-stay is installed. Now, vimwiki maps
<cr>
(and everything else it maps) regardless of whether I have my own mapping.Any idea as to why this is happening? I'd like to fix this, as I like both plugins a lot.