Skip to content
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

How to use with repmo and g:qs_highlight_on_keys #79

Open
HaleTom opened this issue Dec 10, 2021 · 1 comment
Open

How to use with repmo and g:qs_highlight_on_keys #79

HaleTom opened this issue Dec 10, 2021 · 1 comment

Comments

@HaleTom
Copy link

HaleTom commented Dec 10, 2021

I want to reduce visual noise, so turn off highlighting until a motion key is pressed:

let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']

However, when I'm using repmo-vim (repeat motion), it doesn't work as expected:

I can't press fa to go to the first a, then use repmo's ; to repeat the motion and jump to the next a.

What happens when pressing ; is that all the jumpable targets are highlighted.

repmo config:

nmap <expr> f repmo#Key('<Plug>(QuickScopef)', '<Plug>(QuickScopeF)')
nmap <expr> F repmo#Key('<Plug>(QuickScopeF)', '<Plug>(QuickScopef)')
@bradford-smith94
Copy link
Collaborator

I'm not exactly sure, as this is the first I've heard of repmo-vim, but I think this may be due to how you've set the "reverse motion".

Quick-scope isn't doing any motion itself, what the mapping is doing is simply providing the target highlighting and then capturing the next character pressed. It then returns the motion character and the target that it captured (i.e. fa) so that Vim handles the motion as it would by default. So both the forward and backward motions you have in your example should land you inside a quick-scope function waiting for you to press another key (with targets highlighted), if repmo-vim is expecting the "reverse motion" to simply put the cursor back to where it came from, then I don't think it will.

You may want to ask for help in repmo-vim, as I don't really know what it's settings are expecting. If you end up needing a quick-scope based solution for this you might want to follow #78. When that issue gets resolved you may be able to set something like:

nmap <expr> f repmo#Key('<Plug>(QuickScopef)', '<C-o>')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants