Skip to content

Some vi key bindings will not work after running lazygit #7853

Closed
@Cokile

Description

@Cokile

Fish Version:
fish, version 3.2.1

Operating System:
MacOS 10.15.7
Darwin MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64

Terminal:
iTerm2 build 3.4.4
xterm-256color

config.fish:

set fish_key_bindings fish_user_key_bindings

functions/fish_user_key_bindings.fish:

function fish_user_key_bindings
    fish_vi_key_bindings
    
    # map jk to Esc
    bind -M insert jk "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char force-repaint; end"
end

Steps to reproduce:

  1. Install lazygit via Homebrew
$ brew install lazygit
  1. Run lazygit
$ lazygit
  1. Quit lazygit

Before running lazygit, all vi key bindings work as expected. But after running lazygit, some vi key bindings will not work:

  1. cw, dw: just moving the cursor to the beginning of the next word, no characters will be deleted.
  2. jk: just outputting the jk rather than switching to normal mode. But if press j only, nothing will appear, it seems fish is still waiting the subsequent input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions