alexherbo2 / auto-pairs.kak

Auto-pairing of characters for Kakoune
https://kakoune.org
77 stars 18 forks source link

Using words as autopairs #30

Closed asyncial closed 4 years ago

asyncial commented 5 years ago

Hey, is it possible to use full strings as autopairs? For example if and fi in shellscripts. Thanks for providing this useful plug in!

alexherbo2 commented 5 years ago

Not at the moment, but patches are welcome.

I have to check the code, but if my memory is good, it could be done by iterating the pairs, testing count H, where count represents the length of the opening pair being iterated, for each selection matching, insert the corresponding closing pair.

asyncial commented 5 years ago

Alright, thanks, I will look into it.

dgmulf commented 5 years ago

That would be a great feature. :)