nvim-autopairs icon indicating copy to clipboard operation
nvim-autopairs copied to clipboard

feat: add 'map_custom_bs' option

Open LexeyKhom opened this issue 1 year ago • 4 comments

Problem: Some users (like me) use a custom bs key.

LexeyKhom avatar Feb 19 '24 17:02 LexeyKhom

that function is public . i think you can add this on your config.

windwp avatar Feb 19 '24 23:02 windwp

Yes, I did that before. The real problem is that the API can change (as it did recently) and I'm a little lazy to get into the code every time... :)

In general, the solution seems simple, but I spent more than an hour before arriving at it. At first I tried to write my own callback, but it didn't work out very well

LexeyKhom avatar Feb 20 '24 06:02 LexeyKhom

You could make your mapping call the remapped backspace, with remap = true

vim.keymap.set('i','<custom-bs>','<bs>',{remap = true})

Sam-programs avatar Feb 20 '24 12:02 Sam-programs

You could make your mapping call the remapped backspace, with remap = true

vim.keymap.set('i','<custom-bs>','<bs>',{remap = true})

Yes, that works too. Thanks for the solution

LexeyKhom avatar Feb 20 '24 12:02 LexeyKhom