Previously, `:PlugDiff` would show every new commit to a plugin's git
repo. This makes sense for the general case, but makes less sense when a
plugin lives in a subdirectory of the repo (and is configured with the
'rtp' option). This makes it difficult to determine which commits relate
to the plugin and which are unrelated.
This changes `:PlugDiff` to filter out any commits outside of the 'rtp'
folder.
Some consequences:
* This does not change the `:PlugUpdate` UI. This means `:PlugUpdate`
may pull down non-plugin commits, display that it has updated the
plugin, and then `:PlugDiff` will show no updates (since such commits
fall out of the 'rtp' path).
* It also means there's no UI to revert non-plugin updates, as they
don't show up in `:PlugDiff`.
This allows you to override the default behavior of `o' or `<cr>'
binding in PlugDiff window.
e.g.
" Move to preview window
autocmd! FileType vim-plug nmap <buffer> o <plug>(plug-preview)<c-w>P
Close#749Close#768
When loading 'deoplete.nvim' for the 2nd time during InsertEnter
manually, the `s:dobufread` (or `s:lod` itself) prevents it to work
properly - likely because the plugin gets resourced.
Maybe there could be a way to force this (and reload plugins always),
but by default it seems to make sense to skip already loaded plugins.
Checking out a branch or tag may not succeed if there is a path entry
with the same name. This commit appends -- to git checkout commands to
clarify that we're not referring to a file or a directory.
Close#602
Now `:PlugInstall!` and `:PlugUpdate!` forces to update submodules.
`:PlugInstall!` now also checks out to new specified branch, tag, or
commit.
Also added tests for changing branch, tag, or commit.
This commit extracts duplicate logic out of three installers.
Pros.
- Better maintainability
- Easier to add/extend the features
- Fixes a bug when 'commit' option is used, submodules are updated
before the designated commit is checked out
Cons.
- The whole process takes slightly longer due to lost parallelism after pull
- Especially, submodule updates are not parallelized
- However, this shouldn't matter much in practice as there are few
plugins that heavily rely on submodules
- The output file is no longer executable but a source-able vim script
- PlugSnapshot FILENAME to prompt the user if the file already exists
- Add PlugSnapshot! FILENAME variant to force overwrite existing file
- Apply -complete=file option to PlugSnapshot command