Skip to content

Set timeout for waiting for a key sequence to complete #7401

Closed
@comfortablynick

Description

@comfortablynick

fish, version 3.1.2-1530-g06bd1e934

With a clean environment, I run these commands:

fish_vi_key_bindings

# kj -> Esc
bind -M insert kj 'if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char repaint-mode; end'

Any time I press k, fish waits indefinitely for the j. Is there an equivalent of timeoutlen in Vim? By default, Vim will only wait 1 sec for j before assuming I'm just pressing k.

'timeoutlen' 'tm'       number  (default 1000)
                          global
Time in milliseconds to wait for a mapped sequence to complete.

Fish seems to assume I'm never just pressing k. There is $fish_escape_delay_ms but it doesn't seem to affect this. Shouldn't there be something like this for regular key bindings?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions