On Do, 23 Apr 2020, Gregory Seidman wrote:
> 
> There is a more functionality than a mapping could provide:
> 
> - Is there even a way to write a mapping that takes a following character
>   and puts it in the map? nmap S<NextChar>  f<NextChar>l ???
> 
> - F/f/T/t commands don't move at all if the character is not found.
> 
> - F/f/T/t commands set what , and ; does but a mapping can't
> 
> A new gx or whatever command would make it possible to map to something
> shorter with correct semantics.
> 
> Meanwhile, I'm not sure this is a feature I'd necessarily use, but I like
> the concept.

If you are serious with such a mapping, you would need to create a 
plugin. I have done with my improved-ft plugin, that replaces the f/F 
functions with a search function. The whole logic became a bit complex, 
because of error handling and edge cases, so it is not so easy to do. 

There are other alternative plugins like clever-f or sneak or 
fanfingtastic (and probably even more).

But still, personally I don't think we need 2 built-in keys for that 
(forward and backward motion) and I have never really had the use for 
such a movement in all the years. Probably because the alternative like 
'f<key>l' is easy enough to type (yes, I know it's not quite the same).

Besides, which keys to chose? It could be only g<key><argument> or 
z<key><argument>, which means you would have to type 3 characters. That 
is the same as f<key>l already, so not much is won. 

Best,
Christian
-- 
Lieber Arm dran als Bein ab.

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20200423160356.GK25035%40256bit.org.

Raspunde prin e-mail lui