zsh-vi-mode icon indicating copy to clipboard operation
zsh-vi-mode copied to clipboard

zvm doesn't work after source .zshrc

Open stimw opened this issue 2 years ago • 11 comments

General information

  • Terminal program: iTerm 3.4.15
  • Operating system: MacOS 12.2.1 & Debian 11 (bullseye)
  • ZSH framework: oh-my-zsh
  • ZSH version: 5.8
  • ZVM version: v0.8.5

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

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

stimw avatar Feb 28 '22 07:02 stimw

meet same problem

kuang22 avatar May 21 '22 14:05 kuang22

I am also facing the same issue.

blank-manash avatar May 24 '22 20:05 blank-manash

~~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?

scresante avatar Jun 01 '22 23:06 scresante

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.

kuang22 avatar Jun 03 '22 07:06 kuang22

+1

fightyz avatar Jul 10 '22 02:07 fightyz

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.

CamilleHbp avatar Jul 19 '22 06:07 CamilleHbp

+1

Fengjing95 avatar Jul 23 '22 01:07 Fengjing95

+1

BoltLi avatar Aug 14 '23 00:08 BoltLi

Hi @stimw,

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

Thanks & Regards

jeffreytse avatar Aug 14 '23 02:08 jeffreytse

Hi @jeffreytse,

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

A-ElMahmi avatar Dec 21 '23 01:12 A-ElMahmi

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'

pilgrimlyieu avatar Feb 15 '24 15:02 pilgrimlyieu