`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>
Use build stages to group related jobs (Vim, Neovim, Vim 7.4).
Use "silent" to avoid hit-enter prompt when redirecting output.
Always run async and sync tests to debug runtime errors.
Vim 7.4.0052 (Ubuntu Trusty) does not allow dynamic keys in inline dictionary.
https://docs.travis-ci.com/user/build-stages/
":Plug" performs a quick type check for most options so that the user can check which plugin has invalid configuration on startup. This does not prevent errors, resulting from modiying "g:plugs" after running "plug#end()". Plugin repo is added to the error message for convenience. Most users should expect no noticeable difference in startup time.
Close: #930
Related: #936
This allows Neovim to bypass the shell and run git directly.
Vim still needs the shell because of how commands are collapsed on Windows and because setting the job's working directory via "cwd" does not work.
Refactored s:clone_opt to a list to make this possible.