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

Need Help, i must "source .zshrc" first for the plugin to works #140

Closed
rafli-sss opened this issue Dec 11, 2022 · 2 comments
Closed

Need Help, i must "source .zshrc" first for the plugin to works #140

rafli-sss opened this issue Dec 11, 2022 · 2 comments

Comments

@rafli-sss
Copy link

rafli-sss commented Dec 11, 2022

Screenshot from 2022-12-11 12-06-17

At first, ".zsh" + Up Arrow should be "nvim .zshrc" or "source .zshrc". But nothing happens,
Then i "source .zshrc".
And it works.

@rafli-sss
Copy link
Author

Closed

It is because of zsh-vi-mode plugin.
I have to bindkey in zvm_after_init_commands

@vcolano
Copy link

vcolano commented Oct 12, 2023

@rafli-sss thanks a ton for your last comment, this was my issue! I am using oh-my-zsh, here is the relevant part of my .zshrc file after I got it working:

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
    git
    docker
    zsh-vi-mode
    zsh-autosuggestions
    zsh-syntax-highlighting
    zsh-history-substring-search
)

# Configure zsh-history-substring search to work with zsh-vi-mode
# See https://github.com/zsh-users/zsh-history-substring-search#usage
# and https://unix.stackexchange.com/a/248789
# and https://github.com/jeffreytse/zsh-vi-mode#execute-extra-commands
zvm_after_init_commands+=("bindkey '^[[A' history-substring-search-up && bindkey '^[[B' history-substring-search-down")


# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
alias brew=/opt/bin/brew

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

source $ZSH/oh-my-zsh.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants