NrrwRgn icon indicating copy to clipboard operation
NrrwRgn copied to clipboard

How to remap all key bindings ?

Open jonahfang opened this issue 2 years ago • 5 comments

I use Lazy.nvim to install the plugin, I want: (1) disable all current default key bindings. (2) only define a key binding (eg, <leader> n) to relpace function of current <leader>nr.

jonahfang avatar Sep 24 '23 00:09 jonahfang

that is not possible. The plugin defines keybindings for a reason.

chrisbra avatar Sep 24 '23 21:09 chrisbra

Thanks. I forked this project and solved this issue!

jonahfang avatar Sep 24 '23 23:09 jonahfang

that is not possible. The plugin defines keybindings for a reason.

I too would prefer to disable all keybindings and define my own, why do you not want this to be possible, for what reasons? 🤔

bew avatar Sep 25 '23 07:09 bew

you just need to re-define those mappings here:

https://github.com/chrisbra/NrrwRgn/blob/e027db9d94f94947153cd7b5ac9abd04371ab2b0/plugin/NrrwRgn.vim#L68-L81

and then it shouldn't define its own mappings.

chrisbra avatar Sep 25 '23 07:09 chrisbra

Setting g:nrrw_rgn_nomap_nr & g:nrrw_rgn_nomap_Nr is even better, my mappings would be dynamically set later so not from the start.

bew avatar Sep 25 '23 07:09 bew