-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behaviour of one-character operator maps #82
Comments
So you have The
Notice the last argument is 1. This will cause Note: an upcoming commit will add an extra parameter to
Don't forget that [count] works too. |
Right, I forgot to mention that I was using streak mode. You mappings seem to work, thanks! By the way, I noticed that in the help file the The only thing that would be nice now if you could restrict these mapping to the current line (as standard |
Thanks for the heads up about the doc. #84
Hadn't thought about that angle. Streak-mode always jumps to the first match, so I assume you mean don't show target labels. I like your idea because it is nearly deterministic if the user is targeting something on the current line, to guarantee no nagging target labels. If the user is targeting some other line, especially with 1 character, then target-label mode should reasonably be expected, so that's also deterministic (for 1-char at least). I think somewhere in there is a really good compromise, better than the current default >2 matches thing. Made an issue: #85 Thanks! |
FYI, If you use vim-sneak as a streak mode vim-easymotion already implementd within line motion which working range is only current line. (If you use vim-sneak as a vanilla sneak, just ignore me.) You can map it like this.
If there is only one match on current line, jump to target immediately like default vim behavior without activating EasyMotion prompt. So I think you like it this motions. Also note EasyMotion implement 2-key find motion like vim-seek/vim-sneak, so you can use it as default streak mode.
|
Leaving this open to track enhancement:
|
I use the operator maps suggested in the manual, like
omap f <Plug>Sneak_f
. But if try to use them with for exampledfe
orvfe
it always executes the action to the first match and then highlights the rest. I guess this is consistent with the way normal jumping works, but it makes it essentially impossible to for example delete to a specific match in a line. Maybe it would make sense for operator-pending maps (and possibly visual-mode maps too) to ask where to jump to before executing the action.The text was updated successfully, but these errors were encountered: