On 2015-07-30 Thursday at 18:45 -0400 James McCoy wrote: > On Thu, Jul 30, 2015 at 10:28:16PM +0200, Roland Eggner wrote: > > On 2015-07-29 Wednesday at 21:51 -0400 James McCoy wrote: > > > +getcharsearch() > > > *getcharsearch()* > > > + Return the current character search information as a {dict} > > > + with the following entries: > > > + > > > + char character previously used for a character > > > + search (|t|, |f|, |T|, or |F|); empty string > > > + if no character search has been performed > > > + forward direction of character search; 1 for forward, > > > + 0 for backward > > > + until type of character search; 1 for a |t| or |T| > > > + character search, 0 for an |f| or |F| > > > + character search > > > > Instead of “forward” and “until” entries having an entry “command” with the > > four > > legal values “f” “F” “t” “T” would be easier to memorize. > > > > What do you think? > > Interesting idea, but the current functionality allows one to easily control a > single aspect of the search without needing to know the rest. > > Currently, to set/reverse the direction I can just > > :call setcharsearch({'forward': 1}) > or > > :call setcharsearch({'forward': !getcharsearch().forward}) > > respecitvely without needing to know what type of character search is in > effect. Using your proposal turns the above into something like > > :call setcharsearch({'command': tolower(getcharsearch().command)}) > > and > > :call setcharsearch({'command': tr(getcharsearch().command, 'tfTF', > 'TFtf')}) > > That seems more unwieldy to me.
Yes in this usage examples I see the advantage of your variant. “f” or “t“ → “getcharsearch().forward == 1” having the effect of “true“ in expressions matches intuition, but “until” seems to me rather difficult to memorize. Could you imagine {dict} entry name “exlusive” instead of “until”, with the same values? Or “inclusive” with the values swapped? Thank you. -- Best regards, Roland Eggner -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
pgpgpYWEJ9aLg.pgp
Description: PGP signature