|
|
@@ -84,6 +84,7 @@ let s:loaded = get(s:, 'loaded', {})
|
|
|
|
|
|
function! plug#begin(...)
|
|
|
if a:0 > 0
|
|
|
+ let s:plug_home_org = a:1
|
|
|
let home = s:path(fnamemodify(expand(a:1), ':p'))
|
|
|
elseif exists('g:plug_home')
|
|
|
let home = s:path(g:plug_home)
|
|
|
@@ -1273,13 +1274,14 @@ function! s:revert()
|
|
|
endfunction
|
|
|
|
|
|
function! s:snapshot(...) abort
|
|
|
+ let home = get(s:, 'plug_home_org', g:plug_home)
|
|
|
let [type, var, header] = s:is_win ?
|
|
|
\ ['dosbatch', '%PLUG_HOME%',
|
|
|
\ ['@echo off', ':: Generated by vim-plug', ':: '.strftime("%c"), '',
|
|
|
- \ ':: Make sure to PlugUpdate first', '', 'set PLUG_HOME='.s:esc(g:plug_home)]] :
|
|
|
+ \ ':: Make sure to PlugUpdate first', '', 'set PLUG_HOME='.s:esc(home)]] :
|
|
|
\ ['sh', '$PLUG_HOME',
|
|
|
\ ['#!/bin/bash', '# Generated by vim-plug', '# '.strftime("%c"), '',
|
|
|
- \ 'vim +PlugUpdate +qa', '', 'PLUG_HOME='.s:esc(g:plug_home)]]
|
|
|
+ \ 'vim +PlugUpdate +qa', '', 'PLUG_HOME='.s:esc(home)]]
|
|
|
|
|
|
call s:prepare()
|
|
|
execute 'setf' type
|