Skip to content
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

Key combo "Esc k" when already in normal mode scrolls up infinitely #39

Closed
Hubro opened this issue Mar 2, 2021 · 2 comments
Closed
Assignees
Labels
bug Something isn't working verified This issue was already verified

Comments

@Hubro
Copy link
Sponsor

Hubro commented Mar 2, 2021

From insert mode, pressing "Esc k" works as expected. You leave insert mode into normal mode and scroll back in history once.

However, if you are already in normal mode, pressing "Esc k" will start scrolling upwards indefinitely, as if I was holding down "k". I have to press Ctrl+c to stop it.

Here is my Zsh config (shell-setup.sh only contains aliases):

HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
KEYTIMEOUT=1
setopt SHARE_HISTORY nomatch notify
#bindkey -v
bindkey '^R' history-incremental-search-backward

fpath=(~/Dropbox/Config/zsh-completions $fpath)


#
# Completion config
#

zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' max-errors 2
zstyle :compinstall filename '/home/tomas/.zshrc'

autoload -Uz compinit
compinit

#
# Antigen plugin manager
#
# This block of config works automatically with the "antigen-git" AUR package
# on Arch and with the "antigen" homebrew package on macOS.
#

# Possible init script locations
ANTIGEN_INIT_SCRIPT=(
    "/usr/share/zsh/share/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

        #NVM_NO_USE=true
        #NVM_AUTO_USE=true
        ##NVM_LAZY_LOAD=true
        #antigen bundle lukechilds/zsh-nvm

        antigen apply

        # Configure zsh-vi-mode
        ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BEAM
        ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
        #ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BLOCK
        #ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
        #ZVM_CURSOR_STYLE_ENABLED=false

        break
    fi
done

unset ANTIGEN_INIT_SCRIPT
unset ANTIGEN_INIT_SCRIPT_PATH

#
# Kubectl completion
#
#if which kubectl &>/dev/null; then
#    eval "$(kubectl completion zsh 2>/dev/null)"
#fi

#
# Shell init script
#
SHELL_SETUP="$HOME/Dropbox/Config/shell-setup.zsh"
[[ -f "$SHELL_SETUP" ]] && source "$SHELL_SETUP"
unset SHELL_SETUP

#
# Pyenv
#
if which pyenv &>/dev/null; then
    eval "$(pyenv init - --no-rehash)"
    eval "$(pyenv virtualenv-init - --no-rehash)"
fi

#
# NVM (Node Version Manager)
#
NVM_INIT_SCRIPT="/usr/share/nvm/init-nvm.sh"
if [[ -f "$NVM_INIT_SCRIPT" ]]; then
    source "$NVM_INIT_SCRIPT" --no-use
    #source "$NVM_INIT_SCRIPT"
fi

#
# Starship
#
if which starship &>/dev/null; then
    eval "$(starship init zsh)"
fi

#
# Direnv (https://direnv.net/)
#
if which direnv &>/dev/null; then
    eval "$(direnv hook zsh)"
fi

#
# Broot
#
if which broot &>/dev/null; then
    source /home/tomas/.config/broot/launcher/bash/br
fi

#
# Allow parent to initialize shell
#
# This is awesome for opening terminals in VSCode.
#
if [[ -n $ZSH_INIT_COMMAND ]]; then
    echo "Running: $ZSH_INIT_COMMAND"
    eval "$ZSH_INIT_COMMAND"
fi

#
# Syntax highlighting
#
SYNTAX_HIGHLIGHTING_INIT="/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
if [[ -f "$SYNTAX_HIGHLIGHTING_INIT" ]]; then
    source "$SYNTAX_HIGHLIGHTING_INIT"
fi

I have tried disabling Starship and syntax highlighting, but that doesn't make any difference.

@jeffreytse jeffreytse self-assigned this Mar 2, 2021
@jeffreytse jeffreytse added bug Something isn't working verified This issue was already verified labels Mar 2, 2021
@jeffreytse
Copy link
Owner

Hi @Hubro

Thanks for the reporting and this issue has been addressed and fixed. Please update your plugin to the latest version.

Thanks and regards

@Hubro
Copy link
Sponsor Author

Hubro commented Mar 3, 2021

Nice, it works! 😁

@Hubro Hubro closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified This issue was already verified
Projects
None yet
Development

No branches or pull requests

2 participants