Skip to content

Vim plugins are never installed (:PlugInstall not run on a fresh setup) #31

Description

@jdevera

Found during the fresh-macOS install documented in #20.

Problem

PlugInstall never runs in vim — on a full fresh install the plugins listed in home/dot_vimrc are not installed.

Context

  • home/.chezmoiexternals/vim_plug.toml fetches ~/.vim/autoload/plug.vim (the vim-plug manager).
  • home/dot_vimrc declares plugins between call plug#begin('~/.vim/bundle') and call plug#end().
  • But nothing ever runs vim +PlugInstall +qall (or the headless equivalent), so a fresh machine has the manager and the config but none of the actual plugins.

Suggested direction

Add a run_onchange_after_ script that runs vim headless to install/sync plugins (e.g. vim -es -u ~/.vimrc -i NONE -c "PlugInstall --sync" -c qa), keyed on the plugin section of dot_vimrc so it re-syncs when the plugin list changes. Should no-op cleanly if vim isn't installed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bootstrapFresh-machine bootstrap / first-run setup

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions