LunarWatcher / auto-pairs

Vim plugin, insert or delete brackets, parentheses, and quotes in pairs
MIT License
173 stars 6 forks source link

Clean up object logic #53

Closed LunarWatcher closed 1 year ago

LunarWatcher commented 2 years ago

Jiangmiao's regex-based system is a mess, and certain parts of the logic just... aren't good, or are really flawed. Mixing regex with non-regex causes Fun Problems:tm: like #41, #52, and possibly more yet to be discovered bugs.

Replacing the rules with lexima-like rules should do the trick. The key takeaway from it is really that we separate regex from input and output, which should also simplify certain parts of the code. Admittedly, this is going to be completely breaking, so it'll have to be done for 4.0.0.

LunarWatcher commented 1 year ago

Very partial work has been performed here, but all the tests pass, and seems to behave much more sanely than the previous version.

I have some post-migration cleanup and documenting to do, but it's mostly far better now