Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Possible feature: PackagerSnapshot command #38

Open
sporian-smckown opened this issue Sep 27, 2022 · 0 comments
Open

Possible feature: PackagerSnapshot command #38

sporian-smckown opened this issue Sep 27, 2022 · 0 comments

Comments

@sporian-smckown
Copy link

I like vim-packager better than minpac because of its more useful feedback during install and update operations.

It would be nice in my use case to have an equivalent to vim-plug's PlugSnapshot command, which writes a vim buffer with the current plugins and their commit IDs, like so:

" Generated by vim-plug
" Mon 26 Sep 2022 02:36:23 PM MDT
" :source this file in vim to restore the snapshot
" or execute: vim -S snapshot.vim

silent! let g:plugs['base16-vim'].commit = '3be3cd82cd31acfcab9a41bad853d9c68d30478d'
silent! let g:plugs['fzf'].commit = '731daf0f37bcaa45ba6ec6f67f716a76c291ad35'
silent! let g:plugs['fzf.vim'].commit = '9ceac718026fd39498d95ff04fa04d3e40c465d7'
silent! let g:plugs['vim-fugitive'].commit = 'dd8107cabf5fe85df94d5eedcae52415e543f208'
silent! let g:plugs['vim-mkbuild'].commit = '8d497467bb03397587c1ae6364afb56542164484'
silent! let g:plugs['vim-sensible'].commit = '8985da7669bbd73afce85ef0e4a3e1ce2e488595'

PlugUpdate!

I write this to a file that I keep alongside vimrc in my dotfiles.git. If I ever update plugins and things break, I can revert the update by running the above vimscript. With this scheme, I can also revert to any previous version of my vim setup and easily replicate a setup to another computer.

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

No branches or pull requests

1 participant