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

keybinding to :enew does nothing #2604

Closed
glennsl opened this issue Oct 21, 2020 · 0 comments · Fixed by #2713
Closed

keybinding to :enew does nothing #2604

glennsl opened this issue Oct 21, 2020 · 0 comments · Fixed by #2713
Labels
A-input Area: Input management, keyboard layout, IME etc. bug Something isn't working

Comments

@glennsl
Copy link
Member

glennsl commented Oct 21, 2020

As reported by @spar7453 in #1423 (comment):

@glennsl
I tried to bind as the following
{ "key": "< space>fn", "command": ":enew", when: "normalMode" }
and it did not work.

I think that we cannot bind every vim commands in this way
and also waiting for binding
{ "key": "< space>b1", "command": ":b2", when: "normalMode" }

(I had to put empty space in front of "s" because the editor removes "< space>")

I've reproduced this myself using

  {"key": "ll", "command": ":enew", "when": "normalMode"}

and can see from the logs that the command is being executed, but nothing happens.

I suspect it's because of the effects added in #2597 which are just ignored here:

let executeExCommandEffect = command =>
Isolinear.Effect.create(~name="keybindings.executeExCommand", () =>
ignore(Vim.command(command): (Vim.Context.t, list(Vim.Effect.t)))
);

@glennsl glennsl added A-input Area: Input management, keyboard layout, IME etc. bug Something isn't working labels Oct 21, 2020
bryphe added a commit that referenced this issue Nov 14, 2020
bryphe added a commit that referenced this issue Nov 14, 2020
__Issue:__ Binding to some ex commands - like `:enew` - aren't working as expected. In the `:enew` case, no buffer is opened.

__Defect:__ The effects are being ignored, so there is no buffer transition

__Fix:__ Re-use the effect logic in `VimStoreConnector` to handle this (use the `VimExecuteCommand` action).

Fixes #2604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-input Area: Input management, keyboard layout, IME etc. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant