* Open vim-plug window in a new tab not to disrupt the current window layout
* Open preview window on the right to better show the diff
If you prefer the old layout, use the following configuration:
let g:plug_window = 'vertical topleft new'
let g:plug_pwindow = 'above 12new'
Fix#1005
vim-plug will now run `git remote set-head origin -a` on PlugUpdate to
keep track of the default branch of the origin, so that it can still
update a plugin even if its default branch has changed.
This additional command will slow down the update process, but this is
an unavoidable price to pay for the correctness of the task. However,
vim-plug will run checkout and merge commands in parallel, so this
improvement will slightly offset the slowdown.
Neovim 0.5.0 allows lua files to be used in runtime files (such as
plugin, ftdetect, etc.) as well as vimscript files. Indeed, some
plugins have `plugin/*.lua` scripts only, but not `plugin/*.vim`;
such plugins cannot be sourced and work properly if it is lazy-loaded.
`i_CTRL-O` may change the cursor position in an unexpected way.
For example, when `autoindent` is set, the user will expect that
`i asdf<CR><C-O>` will place the cursor right below `a`.
However, `<C-O>` moves the cursor to the first column of line 2.
Expected:
```
asdf
█
```
Actual:
```
asdf
█
```
Therefore, it's desirable to use `i_CTRL-\_CTRL-O`, the variant of
`i_CTRL-O` that does not move the cursor.
Otherwise if the user has set a `git config clone.defaultRemoteName
foo`, then vim-plug will fail to detect the latest upstream changes as
the remote will be incorrect, and will repeatedly state that the plugin
repo needs to be cleaned.
Previously, the highlight of the `------------` line below the `Last Update:`
changed from `plugH2` on the whole line to `plugDash` on the first `-`
when the cursor moved over it and went below it. This commit updates the
`syn match` commands a bit to correct that issue.
Close#1027
* Make git operation faster
When using many plugins, vim-plug may spawn many git processes for them.
* get revision
* get branch
* get remote.origin.url
This is too heavy. especially on Windows. This change get revision, branch,
remote origin url directly from .git directory.
This idea is borrowed from @k-takata's commit for minpac.
Executing external programs is slow especially on Windows.
Read the information directly from .git directory.
* Copied from devel branch of minpac
* Avoid errors
* Show errors
* Use empty()
* Use empty string instead of v:null
* Check spec.branch is empty
* Use branch
* Fix branch and revision
* Remove l: and use s:trim
* Fix and simplify s:git_get_remote_origin_url
* Do not cut off commit hash for correctness
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>