I really like my .vimrc config file with automatically downloads and installs all dependencies including the plugin manager and all the new while removing plugins which were removed from my .vimrc plugins which allowed me to download my .vimrc from GitHub and get starting without too much headache. here is an example of the automation:

" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
      \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
  \| PlugInstall --sync | source $MYVIMRC
\| endif

call plug#begin()

I'm trying to configure a similar thing for .zshrc and I'm not sure how to start. I can't figure out how to get ohmyzsh to download plugins. Can someone please help me? Thanks

  • 1
    I don't understand what you're trying to do here. Is your .zshrc on GitHub? Why not just git clone https://github.com/YechielWorenklein/home . or whatever you do for vim? Jan 10, 2021 at 22:13
  • my issue is not with vim, I'm trying to get my .zshrc to be like my .vimrc Jan 11, 2021 at 21:54
  • I didn't know .vimrc could be configured to download plugins. Maybe you could share a few lines that do that so we can understand what an equivalent would be.
    – Stewart
    Jan 12, 2021 at 11:06
  • autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) \| PlugInstall --sync | source $MYVIMRC \| endif @Stewart Jan 12, 2021 at 20:13

2 Answers 2


You can use this simple plugin to fully auto-update themes and plugins OhMyZSH

Link to github: OhMyZsh Full-autoupdate


Yechiel from the future here...

This was a noob question and I appreciate everyone for not mocking me on it...

This can be achieved very easily with a simple shell logic to check if the oh-my-zsh directory exists and runs installation command if not.


[[ -x $HOME/.oh-my-zsh ]] || sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • You asked how to get OMZ to automatically download and install plugins. This doesn't answer that question. Jan 19 at 5:40
  • @MarlonRichert, am obviously assuming a .zshrc with the list of plugins. Jan 20 at 17:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .