EasyMotion icon indicating copy to clipboard operation
EasyMotion copied to clipboard

Fix conflict with VsVim

Open jaredpar opened this issue 11 years ago • 17 comments

Right now VsVim and EasyMotion are fighting for the same key strokes. Need to resolve this conflict

jaredpar avatar Jul 09 '14 22:07 jaredpar

:+1:

bayleedev avatar May 07 '15 16:05 bayleedev

@jaredpar I realize this is an old issue, but I'd be happy to help if you point me in the right direction. Are you still using this plugin?

bayleedev avatar May 08 '15 17:05 bayleedev

@blainesch the main direction here is that EasyMotion needs to declare somehow that it is interesting in handling key strokes. Probably by just adding a GUID or to an ITextView property bag. Essentially something where VsVim can notice EasyMotion and back off of key handling when it sees that.

jaredpar avatar May 13 '15 20:05 jaredpar

Is it possible to have a generic key handlers that fires events that both plugins can listen to? This could be in the form of a separate plugin that these both depend on.

This plugin talking directly to vsvim seems a bit coupled, but at the same time it's not like there's a million plugins doing this sort of thing.

I'm new to C# but don't mind taking a stab at it, do you mind pointing me to some key files I would be interested in?

bayleedev avatar May 13 '15 20:05 bayleedev

@blainesch a generic shared handler is possible but ends up requiring a third project. Adding values into a property bag is effectively the same operation though but not as strongly typed. I'm not sure there is a key file to put this into as it requires a couple of changes. Let me look at it.

jaredpar avatar May 20 '15 18:05 jaredpar

:+1: I was super excited to see that easymotion exists for Visual Studio, but then totally bummed that it's not compatible with VsVim!

aikeru avatar May 27 '15 20:05 aikeru

:+1:

chtenb avatar Dec 24 '15 16:12 chtenb

@jaredpar This still occurs for me with EasyMotion 1.0.1 and VsVim 2.0.1.0 in Visual Studio Enterprise 2015 version 14.0.25123.00 Update 2.

  1. Start in normal mode
  2. Activate easy motion by pressing ctrl-shift-;
  3. Press 'i' to highlight all 'i' characters on current page
  4. Press any highlighted destination character

Results: Insert mode is entered after pressing 'i' prior to pressing the highlighted destination character resulting in the highlighted destination character being inserted at the final destination location immediately after the jump.

Possible solution: Add an EasyMotion-mode to VsVim, triggered with EasyMotion shortcut, that causes VsVim to completely ignore the next two keystrokes (hackish but whatever). Could even possibly use the shortcut as an input toggle for the two plugins and have easy motion emit (but ignore) the shortcut after the jump to handoff input priority back to VsVim. Pretty disgusting but possibly easy to implement?

seatownrocks avatar Apr 26 '16 04:04 seatownrocks

Maybe call easymotion directly from within VsVim, instead of making EasyMotion listen to keystrokes itself.

chtenb avatar Apr 26 '16 07:04 chtenb

Agree. It would be cool feature of vsvim. Because they are really do not want to work together.

zhikin2207 avatar May 04 '16 07:05 zhikin2207

did this problem fixed?

zazuone avatar Jun 16 '16 06:06 zazuone

Anyone know of a workaround? I would love to use both of these extensions, or substitutes if you know of any.

ethanfischer avatar Jun 22 '17 02:06 ethanfischer

Could it just disable vsvim and re-enable vsvim at the end?

keithn avatar Jul 03 '17 05:07 keithn

I'm using the Vim emulation in VsCode, and what they have done is embed easymotion into their vim emulator ( along with some other toys ) ... given both this project and the easymotion one have the same originator. Maybe this is an option for VsVim? just build it into the project and have an option to turn it on?

keithn avatar Sep 03 '17 22:09 keithn

Is this still a problem?

sarchertech avatar Feb 12 '19 21:02 sarchertech

@learc83 I haven't tried recently, but I'm guessing it's not fixed, I have mentioned in another thread on VsVim that there is another tool called AceJump that does something similar and works well with VsVim. You can also bind it to whatever keystrokes you like with your vimrc

keithn avatar Feb 12 '19 21:02 keithn

I just tested out PeasyMotion and this also seems to work fine with VsVim. https://marketplace.visualstudio.com/items?itemName=maksim-vorobiev.PeasyMotion2022

v21k3v3dur avatar Aug 19 '22 13:08 v21k3v3dur