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

Multicursors and fd #14765

Closed
gdkrmr opened this issue May 11, 2021 · 14 comments
Closed

Multicursors and fd #14765

gdkrmr opened this issue May 11, 2021 · 14 comments

Comments

@gdkrmr
Copy link
Contributor

gdkrmr commented May 11, 2021

Typing fd gets you out of whatever mode you are in. This is nice if you work in the terminal and there is a delay when typing [ESC]. When having multiple cursors, this does not work as intended, you actually get out of insert mode but on all secondary cursors "fd" is being inserted. Where do I start looking to fix this?

@lebensterben
Copy link
Contributor

@lebensterben
Copy link
Contributor

According to Lewand, arranged from most to least common in appearance, the letters are: etaoinshrdlcumwfgypbvkjxqz

xz is a good choice

@gdkrmr
Copy link
Contributor Author

gdkrmr commented May 11, 2021

the issue is not the choice of "fd" the issue is that if I use multiple cursors in insert mode and press "fd", the letters fd get inserted into the document at the secondary cursors.

@lebensterben
Copy link
Contributor

Do you use evil-mc or multiple-cursor?
How to reproduce this?

@gdkrmr
Copy link
Contributor Author

gdkrmr commented May 11, 2021

I am using evil-mc. To reproduce:

  • enable multiple-cursor layer and use vim mode
  • Open a file
  • move your cursor to any symbol that appears more than once
  • Press C-n as often as you want to create multiple cursors
  • Go to insert mode, type something
  • Press fd to get out of insert mode.
    Result:
    All your cursors will be in normal mode but the secondary cursors will have typed either f or fd.

@lebensterben
Copy link
Contributor

Try

(setq evil-escape-inhibit-functions '((lambda () evil-mc-cursor-state)))

@gdkrmr
Copy link
Contributor Author

gdkrmr commented May 12, 2021

If you use the multiple-cursors layer, then C-n should be bound to evil-mc-make-and-goto-next-match [1]. evil-paste-pop-next should be bound to C-k [2].

[1]

| ~C-n~ | evil-mc-make-and-goto-next-match |

[2]

@lebensterben
Copy link
Contributor

If you use the multiple-cursors layer, then C-n should be bound to evil-mc-make-and-goto-next-match [1]. evil-paste-pop-next should be bound to C-k [2].

[1]

| ~C-n~ | evil-mc-make-and-goto-next-match |

[2]

it was shadowed by another package. dear my new reply

@gdkrmr
Copy link
Contributor Author

gdkrmr commented Jun 4, 2021

This is actually a known problem gabesoft/evil-mc#41 and people tried to fix it #12159

@lebensterben
Copy link
Contributor

Try

(setq evil-escape-inhibit-functions '((lambda () evil-mc-cursor-state)))

@gdkrmr

Does this fix it?

@gdkrmr
Copy link
Contributor Author

gdkrmr commented Jun 7, 2021

This disables evil-escape when having multiple cursors, right? It works, but is not what I want.

@lebensterben
Copy link
Contributor

you haven't tried it.
Evil-escape is still working

@lebensterben
Copy link
Contributor

to be clear, this is not a bug of Spacemacs,
and a workaround is provided.
so I'm closing this.

@gdkrmr
Copy link
Contributor Author

gdkrmr commented Jun 9, 2021

to be clear, this is not a bug of Spacemacs,

agreed

and a workaround is provided.

the workaround doesn't work for me. fd is supposed to switch out of insert mode with multiple cursors, the workaround disables evil-escape instead.

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

No branches or pull requests

3 participants