mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-07 17:44:25 +08:00
Update PlugClean for Gist plugins
In order to install Gist as a plugin, you have to modify its `dir` to be
the `plugin` subdirectory of the normal path of the plugin if it were an
ordinary pathogen-compatible Vim plugin.
Plug 'https://gist.github.com/952560a43601cd9898f1.git',
\ { 'dir': g:plug_home.'/xxx/plugin', 'rtp': '..' }
PlugClean command was incompatible with the above trick, so it was
updated not to remove the parent directory of `dir` of each plugin.
This commit is contained in:
1
plug.vim
1
plug.vim
@@ -1260,6 +1260,7 @@ function! s:clean(force)
|
|||||||
|
|
||||||
let allowed = {}
|
let allowed = {}
|
||||||
for dir in dirs
|
for dir in dirs
|
||||||
|
let allowed[s:dirpath(fnamemodify(dir, ':h:h'))] = 1
|
||||||
let allowed[dir] = 1
|
let allowed[dir] = 1
|
||||||
for child in s:glob_dir(dir)
|
for child in s:glob_dir(dir)
|
||||||
let allowed[child] = 1
|
let allowed[child] = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user