zsh-vi-mode
zsh-vi-mode copied to clipboard
Set default keybindings for Home and End keys
General information
- Terminal program: alacritty 0.9.0 (fed349aaa)
- Operating system: Linux arch 5.14.12-arch1-1 #1 SMP PREEMPT Wed, 13 Oct 2021 16:58:16 +0000 x86_64 GNU/Linux
- ZSH framework: none, but
grml-zsh-config
installed - ZSH version: zsh 5.8 (x86_64-pc-linux-gnu)
- ZVM version: zsh-vi-mode-git-0.8.4.r19.g0c6f34a
Basic examination
- [x] I have read through the README page
- [x] I have the latest version of zsh-vi-mode
- [ ] ~I have tested with another terminal program~ n/a
Problem description
The Home and End keys do not bind to "jump to start of line" and "jump to end of line". This is a regression from the default ZSH behaviour. Vim and Bash vi mode both map Home and End keys by default (https://github.com/jeffreytse/zsh-vi-mode/issues/59#issuecomment-862729015).
@jeffreytse, given that you've already mentioned considering this change (https://github.com/jeffreytse/zsh-vi-mode/issues/59#issuecomment-864930748), I figured I'd create an issue for tracking convenience.
Reproduction steps
-
git clone https://aur.archlinux.org/zsh-vi-mode-git
-
makepkg -si
- add
source /usr/share/zsh/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
to~/.config/zsh/.zshrc.local
- Enter some text, then press Home or End
Expected behavior
Home and End keys map to "jump to start of line" and "jump to end of line" respectively.
Hi @tdltdc
Thanks for your issue, I will work on this issue as soon as possible.
Thanks and Regards
Related to #33
Hi @tdltdc
Now this default keybindings has been implemented, thanks for your patience. : )
Thanks and Regards
Unfortunately, this is still an issue, using st and the latest git pull of zsh-vi-mode. When not in tmux, home works but end doesn't.
The easiest way to fix this, without modifying zmv, is to simply re-bindkey the functionality in your .zshrc after sourcing zmv.
But using the terminfo method is important from a cross-platform compatibility standpoint.
The underlying issue is that apparently, people get different escapes for their home/end keys.
In the original zmv source, it assumes the end key, for example, is ^[[F
while on my system, after hitting Ctrl+v, End, I get ^[[4