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

vim: show pending input beside cursor for multikey mappings #12539

Open
1 task done
justDeeevin opened this issue May 31, 2024 · 8 comments
Open
1 task done

vim: show pending input beside cursor for multikey mappings #12539

justDeeevin opened this issue May 31, 2024 · 8 comments
Labels
enhancement [core label] vim

Comments

@justDeeevin
Copy link

Check for existing issues

  • Completed

Describe the feature

In #4189, support was added for keymaps to multiple keys in succession, pursuing a j k keymap to exit insert mode in Vim mode. While this feature is very useful on its own, it's still a bit clunky to use.

There are two main suggestions I'd like to make:

  • The timeout on the keymap should be adjustable (currently hardcoded at 1000ms)
  • The currently pending key should be previewed, if in the editor (see how Neovim does this below).

If applicable, add mockups / screenshots to help present your vision of the feature

zed.feature.request.demo.mp4
@justDeeevin justDeeevin added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels May 31, 2024
@justDeeevin
Copy link
Author

I'm open to working on a PR for this myself, but it'd take some time to familiarize myself with the codebase. If I find the time, I suppose.

@JosephTLyons JosephTLyons added vim and removed triage Maintainer needs to classify the issue admin read Pending admin review labels May 31, 2024
@xzbdmw
Copy link
Contributor

xzbdmw commented Jun 1, 2024

The currently pending key should be previewed

It seems many vim user is annoyed by that fake char

@justDeeevin
Copy link
Author

It seems that many vim user is annoyed by that fake char

It would make sense to make this optional, then.

@ConradIrwin
Copy link
Member

@justDeeevin If you want to pair on this, feel free to book time here: https://calendly.com/conradirwin/pairing?month=2024-06

I think it'd be nice to show the pending key, if not in the editor, at least in the status bar (where we show f etc.).

@0x2CA
Copy link
Contributor

0x2CA commented Jul 16, 2024

Now hardcoded 1000ms, if you change the configuration will be very good for the delay of jk, but this does not solve the actual problem, in vim in have nowait can solve this problem
for example:

inoremap <nowait> jj <ESC>

@ConradIrwin ConradIrwin changed the title Nicer multi-key mappings vim: show pending input beside cursor for multikey mappings Aug 22, 2024
@paulkass
Copy link

paulkass commented Sep 12, 2024

Second the proposal to "de-hardcode" 1000ms delay and add a nowait option. This issue is really annoying. Especially annoying if I press j multiple times to scroll 3 lines and the editor waits for a second before jumping to the last line.

@xzbdmw
Copy link
Contributor

xzbdmw commented Sep 12, 2024

It seems you have j<something> in your normal mode mapping

@fabiodcorreia
Copy link

fabiodcorreia commented Sep 20, 2024

I also have the same issue, mappings with space for example "space e e" when I'm writing in insert mode every space hangs until 1s passes or I press another key. Would be nice if the wait would me shorter then 1s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] vim
Projects
None yet
Development

No branches or pull requests

7 participants