jeffreytse/zsh-vi-mode

zsh-vi-mode breaks abbr auto expansions

Open

#303 opened on Nov 25, 2024

View on GitHub
 (5 comments) (3 reactions) (1 assignee)Shell (147 forks)github user discovery
good first issue

Repository metrics

Stars
 (4,364 stars)
PR merge metrics
 (PR metrics pending)

Description

General information

The handy https://github.com/olets/zsh-abbr plugin enables the use of abbreviations, which are similar to aliases but they auto-expand when pressing space.

Whenever zsh-vi-mode is enabled it seems to override the bindkey " " abbr-expand-and-insert even in insert mode.

Related issues:

❯ neofetch
                    c.'          paul@Pauls-MacBook-Air
                 ,xNMM.          ----------------------
               .OMMMMo           OS: macOS Sonoma 14.7.1 (23H222) arm64
               lMM"              Host: MacBook Air (M1, 2020)
     .;loddo:.  .olloddol;.      Kernel: Darwin 23.6.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 16 hours, 24 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 4 (pipx), 267 (pip), 9 (npm), 387 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM:       Editor: VIM - Vi IMproved 9.1
:MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 2208x1242 @2x @ 60Hz, 1568x980 @2x @ 60Hz
.MMMMMMMMMMMMMMMMMMMMMMMMX.      DE: Aqua
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM: yabai
 'XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  'XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: MesloLGS-NF-Regular 13
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M1 (8)
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M1 (8)
       "cooc*"    "*coo'"        Memory: 13.36 GiB / 16.00 GiB (83%)
                                 Network: en0: Wi-Fi (802.11ax) @ 1080 Mbps
                                 Disk (/): 15G / 460G (57%)
                                 Locale: en_US.UTF-8
                                 Java: 20.0.2
                                 Node: 20.18.0

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program

Problem description

zsh-vi-mode seems to override the bindkey " " abbr-expand-and-insert even in insert mode.

Reproduction steps

  1. Install https://github.com/olets/zsh-abbr
  2. Install https://github.com/jeffreytse/zsh-vi-mode
  3. Restart shell.
  4. Run abbr add abc=def.
  5. Type abc and then Space ␣.
  6. Nothing happens.

Expected behavior

The abc text is transformed to def right after pressing space. Removing zsh-vi-mode fixes it.

Contributor guide