-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support <c-h>
in g:AutoPairsMapBS
(and ps, thanks!)
#90
Comments
PS, I just experienced it working with |
You're welcome :) Always nice to hear it's being used ^^ I don't think I want to add What you can do, however, is add this to your vimrc:
That'll recursively remap As for Not sure what Right now, auto-pairs/autoload/autopairs.vim Lines 253 to 316 in 2c18fa6
Some, but not all, need to be replaced with a variable, and I'm not sure which (aside the ones on line 253 and 316 - I haven't looked at that code in ages, and most of it remains undocumented dark magic from jiangmiao's original code). That would let the function be defined for multiple different ways to delete text, but still handle pair deletion. I think the exact non-
Though I'm not entirely sure if that can be a global map. Problem for later. If you want to try implementing this, it shouldn't be too hard - it's mostly a matter of replacing the right instances of If not, I'll implement it tomorrow. Out of capacity today unfortunately |
Hey, thanks for the response! I think I'm ok with remapping, I can't imagine it being a problem! I'm a little confused, though, because even Vim says Yes, I certainly won't have time tonight or the next few days to implement but if you haven't gotten to it by the weekend I may give it a shot! Thanks again! |
IIRC, it treats them the same internally, but they are still two different maps. Terminal code conversion is... complicated.
I checked. |
This was all I knew about them before! 🙃
D'oh, my bad. It's been so long that I never remember what's what (and never use other peoples' vims). |
All good, I lose track of what's built-in regularly myself :p |
Closing this up, if you update the plugin, you should be able to add inoremap <silent><expr> <C-w> autopairs#AutoPairsDelete("\<C-w>") to your vimrc, and |
Hiya @LunarWatcher,
I just switched to this plugin after several years of using Kana's smartinput plugin. I knew I had to switch no matter what as soon as I read "1. Upgrade to Vim" in the README 🤣 So far it's working great and fixes an issue I always had with smartinput but never bothered reporting since it seemed largely unmaintained (
i_<CR>
did not work for square brackets).One thing that did work in smartinput is using
<c-h>
as backspace (to delete closing pair) which I do all the time (less of a stretch!). I'm happy to make a PR but thought I'd ask first (also happy to let you do it if you'd prefer).More controversially (and this is something that didn't work in smartinput either): I'm a user of rsi.vim so on top of
<c-h>
I also sometimes hit<c-w>
hoping it will also delete the closing bracket. I'm totally onboard with being conservative and not checking for the presence of other plugins (especially since<c-w>
conflicts with the defaulttermkey
) but I thought I would ask!Thanks for the great plugin and the lolz :)
Andrew
The text was updated successfully, but these errors were encountered: