-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Repeat action in normal mode chomps lines above #181
Comments
This isn't exactly related to the other line-chomping bug that exists. I've already corrected that in my repo at scresante@1fd923d which has PR #180 . Testing against that yields the same results as described above. |
Testing in native |
I see this problem also. |
Same here, super super super annoying. I often ZSH version 5.9 zsh-repeat-command-chomps-above-lines.mp4 |
Hi @scresante I think the latest commit #219 has settled your issue down, could you please have a try with the latest version? Thanks & Regards |
@jeffreytse Of course, I still use this plugin every day 🙂 The fix didn't work though, unfortunately. If I repeat a See recording: demo.mp4 |
Hi Hubro, To solve this, as I can't reproduce it, I'd love to have a digging with you. Thanks & Regards |
@jeffreytse Are you using Starship? My first guess is that the extra line breaks in every prompt is causing the issue. Aside from that, my relevant zsh config is: HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
KEYTIMEOUT=1
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
setopt SHARE_HISTORY nomatch notify
autoload -Uz compinit
compinit
autoload -U +X bashcompinit
bashcompinit
# Possible init script locations
ANTIGEN_INIT_SCRIPT=(
"/usr/share/zsh/share/antigen.zsh"
"/usr/share/zsh-antigen/antigen.zsh"
"/usr/local/share/antigen/antigen.zsh"
)
for ANTIGEN_INIT_SCRIPT_PATH in "${ANTIGEN_INIT_SCRIPT[@]}"; do
if [[ -f "$ANTIGEN_INIT_SCRIPT_PATH" ]]; then
source "$ANTIGEN_INIT_SCRIPT_PATH"
antigen bundle jeffreytse/zsh-vi-mode
antigen bundle rupa/z
antigen apply
# Configure zsh-vi-mode
zvm_after_init_commands+=('__apply_keybindings')
ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BEAM
ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
ZVM_CURSOR_STYLE_ENABLED=true
#ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BLOCK
#ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
break
fi
done
unset ANTIGEN_INIT_SCRIPT
unset ANTIGEN_INIT_SCRIPT_PATH
function __apply_keybindings() {
# Re-applies FZF keybindings
if [[ -f "/usr/share/fzf/key-bindings.zsh" ]]; then
source "/usr/share/fzf/key-bindings.zsh"
elif [[ -f "/usr/local/Cellar/fzf/0.39.0/shell/key-bindings.zsh" ]]; then
source "/usr/local/Cellar/fzf/0.39.0/shell/key-bindings.zsh"
fi
zvm_define_widget __up_one_dir
zvm_bindkey viins '^U' __up_one_dir
}
# ZVM widget to go up one directory (cd ..)
function __up_one_dir() {
BUFFER="cd .."
zle accept-line
}
# Executed automatically by zsh-vi-mode for setting up keybindings
function zvm_after_lazy_keybindings() {
}
# Starship
if which starship &>/dev/null; then
eval "$(starship init zsh)"
fi My Starship config is: command_timeout = 2000
format = """\
$username\
$hostname\
$kubernetes\
$directory\
$git_branch\
$git_state\
$git_status\
$package\
$dotnet\
$golang\
$java\
$nodejs\
$python\
$ruby\
$rust\
$custom\
$nix_shell\
$conda\
$memory_usage\
$aws\
$env_var\
$cmd_duration\
$line_break\
$jobs\
$battery\
$time\
$character\
"""
[character]
#success_symbol = "[➜](bold green)"
success_symbol = "[](bold green)"
vicmd_symbol = ""
#vicmd_symbol = " ∷"
error_symbol = "[](bold red)"
[cmd_duration]
#disabled = true
#show_notifications = true
#min_time_to_notify = 30
[python]
pyenv_version_name = true
[nix_shell]
format = "[\\[$name\\]]($style) "
[custom.direnv]
format = "[\\[direnv\\]]($style) "
style = "fg:yellow dimmed"
when = "env | grep -E '^DIRENV_FILE='" If you're unable to reproduce the issue with this config, I'll contact you by email and we can troubleshoot further if you want. |
After further digging, the minimal reproduced steps as below:
The above line will be eaten as we expect. |
This issue is related to #124 as well. |
Environment information
Basic examination
Problem description
using . (period) to repeat a command causes the lines above to disappear
Reproduction steps
Expected behavior
Previous command repeats, lines above don't get chomped.
The text was updated successfully, but these errors were encountered: