Open mikedmcfarland opened 9 years ago
Can you create an issue instead?
Multiple cursors already has an issue reported for this. Even though the underlying problem is definitely with multiple cursors, not js2-refactor, I still felt this should be reported. Understandably you guys may feel differently.
The fact that js2-refactor uses multiple cursors is an implementation detail. It wasn't obvious to me when I encountered problems with js2-refactor that multiple cursors was at fault, and it would've saved me loads of time to have seen a report like this.
Also the workaround is significantly more useful for js2-refactor then with plain old multiple cursors. Disabling Evil during multiple cursors makes it fairly difficult to use, since suddenly your normal text editing commands are gone. However this isn't an issue with js2-refactor since its making the changes.
@magnars clj-refactor is also using mc, right? Is the same issue affecting clj-refactor?
Yes, clj-refactor allows the user to opt out of multiple-cursors usage.
Magnar Sveen notifications@github.com writes:
Yes, clj-refactor allows the user to opt out of multiple-cursors usage.
Could this be easily backported to js2-refactor?
Not easily, no. clj-refactor tackles it for each individual refactoring.
Magnar Sveen notifications@github.com writes:
Not easily, no. clj-refactor tackles it for each individual refactoring.
BTW, what's the motivation for disabling mc?
The same as here. It doesn't play well with evil-mode.
Would it be possible to add support for evil-mc if evil-mode is installed?
Currently js2 refactor doesn't work if you are using evil. This is because multiple cursors has issues with evil.
Though the underlying problem is with multiple cursors, when I encountered problems I wasn't even aware that js2-refactor used mutliple cursors, nor the incompatibility with evil. I don't use multiple cursors, and it was surprising
Here's a workaround ripped from the config files here. It disables evil while running in multiple cursors. This workaround enables the js2-refactor commands.