ssr.nvim
ssr.nvim copied to clipboard
Prevent keymaps from overriding ssr's keymaps overrides
I have this mapping for <CR>
keymap("n", "<CR>", "<C-^>")
When I now try to press <CR> in the ssr window, it tries to run <C-^> instead of triggering the replace from ssr. Checking the mappings also indicates that my global map seems to override ssr's map somehow?
My current workaround is to simply use a different mapping via ssr's setup, but <CR> actually makes a lot of sense (and switching buffers does not work in the ssr window anyway).
hmmm, I just tried removing my <CR> mapping, and I actually still get an error, when trying to replace_confirm, so this may be not (only) a keymap problem?
The error says there's no title key in nvim_open_win()'s argument. Which version of Neovim are you using?
0.8.0
Just found that it's only available on nightly (0.9)..
Any chance to keep backwards compatibility with 0.8.0, at least for while 0.9.0 isn't fully published?
Automatically, which commit of ssr so works with 0.8.0, so I can freeze that version via packer?
You can freeze it to 4304933853e66060ec03048b2ce3853c39c3886a for now.
thanks. will report back on this issue on the 0.9.0 release
@chrisgrieser hi the "invalid key title" issue should be fixed now.
As for <CR> mapping, ssr's mapping is a buffer local one, and should take precedence. I'm not sure what happened, what's your keymap function?
yes, both issues seem to be fixed with the latest release!
Well, almost – while <CR> works fine now in the ssr main window, it still does not work in the small confirmation window
<CR> is not mapped in this confirmation window, you don't need to move cursor and press <CR>, just press one of y/n/a/q/l.
ah I see. Thanks
Seeing that in most small windows like that, you can confirm a selection with <CR>, it might make sense to add that. Alternatively, you could make it clearer that the items are selected with keys by labelling them [y]es, [n]o, etc. Just from looking at the confirmation window, I would not have figured that out on my own.