Closed rosshadden closed 2 years ago
:keeppatterns
might be used for fixing this, it was introduced by Vim 7.4.083.
@rosshadden Are you still experiencing this issue? Have you experimented with :keeppatterns
?
I looked at editorconfig.vim, and it looks like there is only one place where a search is used (in fact a substitution), and the keeppatterns
option is now present (along with winsaveview()
a few line above):
It should work as expected for the search pattern? Unfortunately not for the substition string, which seems not to be restored by winrestview()
.
Also, if I understand the doc, keeppatterns
should not be needed in a vimscript function: the last used search pattern and the redo command "." will not be changed by functions?
No it doesn't do it anymore. I'm not sure whether I should close the issue though because it seems like it may be affecting @sroccaserra now?
When this plugin is enabled, doing a simple
:w<cr>
adds two entries to neovim's search history:The result is that after saving a file, hitting
n
for example to view the next occurrence of a pattern will instead search for\s\+$
, which is not found. I suspect based on the pattern this is related to trimming trailing whitespace.I have had this plugin commented out for about a year and forgot why until I tried it again just now :D. Should be an easy fix though, and I regret not bringing it up back then.