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

EasyMotion interoperability: Add command to ignore N keystrokes #1839

Closed
mfrischknecht opened this issue Sep 26, 2016 · 6 comments · May be fixed by jaredpar/EasyMotion#19
Closed

EasyMotion interoperability: Add command to ignore N keystrokes #1839

mfrischknecht opened this issue Sep 26, 2016 · 6 comments · May be fixed by jaredpar/EasyMotion#19
Milestone

Comments

@mfrischknecht
Copy link

I'm trying to get VsVim to play nice with EasyMotion, and while I see the merit of a "proper" solution, I think some little tweak in VsVim could actually resolve the issue quite nicely (at least temporarily): As @seatownrocks already mentioned here, the ability to ignore keystrokes in VsVim would be helpful.
I experimented a bit and came up with the following mapping (trying to emulate Spacemacs' bindings):

nmap <silent> <Space><Space> :vsc EasyMotion.Navigate<CR>:

The colon at the end is not forwarded to EasyMotion and prevents unwanted changes to the current document, but I have to hit the Escape-Key after each navigation operation. If VsVim had a colon-command to ignore N keystrokes, one could use a binding like this:

nmap <silent> <Space><Space> :vsc EasyMotion.Navigate<CR>:ignore 2<CR>

This would resolve the issue for now.

@zazuone
Copy link

zazuone commented Nov 25, 2016

somehow it does not work on my vsvim!

@mfrischknecht
Copy link
Author

Interesting. Could it be that this behavior changes with different extension or VS versions? What are you using?
For me, the first binding still works. I'm currently using VsVim 2.1.2.0 and EasyMotion 1.0 on VS 2015 Update 3.

@zazuone
Copy link

zazuone commented Dec 2, 2016

it works now! thank you!

@theamazingfedex
Copy link

@jaredpar any word on a fix for better interop between easymotion and vsvim?

@DomasM
Copy link

DomasM commented May 26, 2017

VsVim is quite a big beast and this issue is long known. So I think maybe it would be easier to band-aid solve it only from the EasyMotion side. As @mfrischknecht mentioned using
nmap <silent> <Space><Space> :vsc EasyMotion.Navigate<CR>:
works almost ok, but user has to hit Esc afterwards. I haven't developed VS extensions, but wouldn't it be possible to send Esc from EasyMotion? We could add one yes/no setting to EasyMotion called something like "VsVim compatibility mode". If checked, EasyMotion would send Esc after navigation, thus solving the issue (together with one entry in .vimrc)

@ricksladkey
Copy link
Collaborator

Closing as duplicate of external issue jaredpar/EasyMotion#3

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