On Thursday, November 14, 2013 11:28:45 AM UTC-5, Daniel "paradigm" Thau wrote: > On Thursday, November 14, 2013 11:01:56 AM UTC-5, Kent Sibilev wrote: > > On Thursday, November 14, 2013 6:24:42 AM UTC-5, Daniel "paradigm" Thau > > wrote:
> Vim tries to use the existing text-objects with a function for each type of > object, then if an invalid specifier is provided it falls back to "flag = > FAIL". All my patch does is wrap that "flag = FAIL" at the end in an > if-check against the setting I added and, if the setting is set, do a > > flag = current_quote(cap->oap, cap->count1, include, cap->nchar); > > i.e.: fall back to treating it like quotes are treated if an object is > requested that isn't (yet) defined. > > > [skip] > > My argument for this patch really boils down to the following: > > As Vim acts now, most of the "<operator>[ai]<character>" namespace is > completely unused. Reserving it for future use doesn't benefit anyone nearly > as much as having it do something sane/useful. A trivially small patch can > be used to have do something useful in the unused part of that namespace > (without touching the used part at all). A disclaimer - plus the fact it is > a default-off setting - can be made (and is, in the patch) so that people do > not rely on those keystrokes always acting the same. I agree with what you are saying. My only complain is that your patch provides a single fallback algorithm, in particular relying on current_quote function. What I would like is to have a more general solution where I can specify my own function to execute based on the pressed character. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
