ultimate-autopair.nvim icon indicating copy to clipboard operation
ultimate-autopair.nvim copied to clipboard

`<C-h>` and `<C-u>` support

Open mawkler opened this issue 2 years ago • 6 comments

Hi! Thanks for working on an awesome plugin! Two native insert mode mappings that I think would make sense to suport out of the box are <C-h> and <C-u>.

<C-h> in insert mode is synonymous with backspace, and <c-u> basically deletes everything you just typed in insert mode.

Currently, when typing ( and then pressing <C-u>, the created pair ) is left behind. I think the right pair should get deleted as well.

mawkler avatar Sep 22 '23 20:09 mawkler

Yeah, I can add <C-u> though it will take time as the API that would make this feature easily implemented is on the TODO stack. I don't know about <C-h>: it's easy to add it to the config. I will also be considering adding support for <C-w>.

altermo avatar Sep 23 '23 04:09 altermo

Ok! Perhaps the default config value for bs.map and bs.cmap should be changed to { '<BS>', '<C-h>' }? To me it makes sense to comply with Neovim's default mappings out of the box. I can create a PR for it if you agree with me 🙂

mawkler avatar Sep 23 '23 11:09 mawkler

You can do that.

altermo avatar Sep 23 '23 13:09 altermo

Any updates on this? Thanks!

Bekaboo avatar Nov 11 '23 10:11 Bekaboo

I'm planning to add it to version 0.7

Version 0.7 will probably come out in a few months, as there's still a lot of work to be done

altermo avatar Nov 11 '23 10:11 altermo

Good to know that! Thanks for your amazing work, please keep going.

Bekaboo avatar Nov 11 '23 10:11 Bekaboo