preservim / vim-textobj-quote

Use ‘curly’ quote characters in Vim
Other
123 stars 6 forks source link

Simplify creation of the text-object #25

Closed telemachus closed 3 years ago

telemachus commented 4 years ago

Instead of four different functions created by a function factory, the main call to textobj#user#plugin can use two patterns, one very simple and one relatively so.

This allows us to remove quite a lot of complex code, and there are two other benefits:

  1. The current implementation uses features of vim-textobj-user that are obsolete, namely the "*{property}-function*" properties. The author of vim-textobj-user says such functions are "are still available, but they will be removed from future versions" (link below). These would need to be updated at some point in any case, though they can be replaced with other functions. (My point being that I replaced them with patterns, but that's not the only reasonable choice.)

    https://github.com/kana/vim-textobj-user/blob/master/doc/textobj-user.txt

  2. The new implementation fixes a current bug (link below), sort of. This implementation fixes the bug for vim users, but it's still present on neovim. I do not honestly understand why, but I suppose this is some progress.

    https://github.com/reedes/vim-textobj-quote/issues/12

alerque commented 4 years ago

Thanks for taking the time to contribute this! It looks great to me on skimming the code, but I haven't actually tested it locally and I'm kind of waiting to get CI testing fixed before merging. See #26.

telemachus commented 3 years ago

@alerque any further thoughts about this pull request?

alerque commented 3 years ago

any further thoughts about this pull request?

Yes. You should have an invite in your notifications to have more direct access to helping out if your are interested. And again sorry this took so long. I'm slightly mystified on why it works, but it does seem to work so lets see how it goes ;-)