jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
2.99k stars 103 forks source link

zvm doesn't work after source .zshrc #169

Open stimw opened 2 years ago

stimw commented 2 years ago

General information

Basic examination

Problem description

zvm

It's tested on my virtual machine, which behaves like my mac.

Vim mode works when login, but doesn't work after source ~/.zshrc...

I have to re-login to make it work.

Same on my mac, I have to reopen the iTerm to make it work.

my .zshrc:

export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
plugins+=(zsh-vi-mode)

source $ZSH/oh-my-zsh.sh

Reproduction steps

  1. Install oh my zsh
  2. Install zvm

Expected behavior

zvm works after source ~/.zshrc

kuang22 commented 2 years ago

meet same problem

blank-manash commented 2 years ago

I am also facing the same issue.

scresante commented 2 years ago

I can't reproduce this.

New user on arch box. Install oh-my-zsh using curl method. Changed my .zshrc to yours.

First and foremost, oh-my-zsh won't even load those plugins, they don't exist.

There is no zsh-vi-mode plugin for oh-my-zsh. It's vi-mode.

Try using this configuration (with an up-to-date install of oh-my-zsh) and see how it works. It works fine for me.

EDIT: Ignore that above. Yes, I can reproduce this too.

If you're already cloning the zsh-vi-mode plugin, why don't you just source the plugin directly?

kuang22 commented 2 years ago

Hey guys, I found a simple solution to this. If you are using omz, just "omz reload" after sourcing the .zshrc. Then everything will goes well. Considering the "source .zshrc" operation is not that often for me, This solution is enough for me.

fightyz commented 2 years ago

+1

CamilleHbp commented 2 years ago

I can confirm that zsh-vi-mode does not work for me either. I was able to fix it by running omz reload as per @kuang22 advice.

Fengjing95 commented 2 years ago

+1

BoltLi commented 11 months ago

+1

jeffreytse commented 11 months ago

Hi @stimw,

Thanks for your problem, I will follow up as soon as possible, please be patient. : )

Thanks & Regards

A-ElMahmi commented 7 months ago

Hi @jeffreytse,

I have this problem too. Is there a solution for this bug?

pilgrimlyieu commented 5 months ago

For those who don't use omz, I have another way using exec. You could use exec zsh after source ~/.zshrc.

I make an alias for it.

alias so='source ~/.zshrc && exec zsh'