wincent / loupe

🔍 Enhanced in-file search for Vim
BSD 2-Clause "Simplified" License
143 stars 6 forks source link

`*` followed by `:%s//x/g` is broken #21

Open gtklocker opened 2 years ago

gtklocker commented 2 years ago

Expected result: The words matched by * are replaced with x. Actual result: After typing :%s/ the magic \v is inserted, and typing the rest of the command /x/g replaces every second character of every line with x.

wincent commented 2 years ago

Thanks for the report. Technically not "broken" per se because Loupe is just doing what it promised it would do (insert \v as soon as you type :%s/), but I can see why this would be annoying. I gather what you expect is that if you type / after that, that the \v will get deleted, leaving just :%s// — is that right?

gtklocker commented 2 years ago

Thanks for the report. Technically not "broken" per se because Loupe is just doing what it promised it would do (insert \v as soon as you type :%s/), but I can see why this would be annoying.

Indeed, strictly speaking I meant my workflow is broken 😅 rather than the plugin itself.

I gather what you expect is that if you type / after that, that the \v will get deleted, leaving just :%s// — is that right?

Yes, this makes sense as a solution.