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.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>

-- 
-- 
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/d/optout.

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui