unblevable / quick-scope

Lightning fast left-right movement in Vim
MIT License
1.42k stars 54 forks source link

Creates <Plug> maps and check for existing mapping #71

Closed ixil closed 3 years ago

ixil commented 3 years ago

Helps with issue #55

bradford-smith94 commented 3 years ago

When I tried this I got E15: Invalid expression: <80><fd>SQuickScopef.

I have let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] set in my vimrc.

:verbose map f seems to indicate that the plug mapping applied correctly (i.e. I see * <Plug>QuickScopef for the x, o and n modes. So I'm not exactly sure what went wrong.

ixil commented 3 years ago

Sorry I didn't check that since I have easymotion that branch of code was never checked. removing <expr> on the default mapping should have fixed it.

Not that even with g:qs_highlight_on_keys - if there is a preexisting mapping for fFtT that mapping will not be applied - it is up to the user to resolve the conflict with existing mappings - Lukily for them it should not be too hard to do since the <Plug>(QuickScope{fFtT}) maps exist and they can chain them together.

timfjord commented 3 years ago

I've been trying to make it work with either clever-f or vim-sneak with something like

nmap f <Plug>(QuickScopef)<Plug>(clever-f-f)

but it is not working(I've tried different variations). I think I am missing something obvious here, @ixil maybe you have an idea how to do that?

ixil commented 3 years ago

@timfjord see my new branch/pr [#73] - I am now able to use nmap f <Plug>(QuickScopeWallHacksF)<Plug>(easmotion-fl). It's not perfect but it helps.

timfjord commented 3 years ago

Awesome, thanks @ixil