Commit Graph

638 Commits

Author SHA1 Message Date
Jan Edmund Lazo
897ce5e2fa
Set/unset shellslash on jobstart (#917) 2019-12-07 01:05:57 -05:00
Jan Edmund Lazo
d2f8ca2dbc
Detect shellslash on Windows (#916)
Warn user if shellslash and shell are incompatible.

Set/unset shellslash for file functions on Windows. Based on 16fc6862a8/plugin/fzf.vim (L30-L107)

Support shellescape for git-bash
Windows user may not set shellslash but wish to use git-bash.
This requires custom shellescape for sh,bash shells
because builtin shellescape() depends on shellslash.
Tested on Vim
2019-12-05 19:34:41 -05:00
Jan Edmund Lazo
93b702512d
Fix shellescaping for git refs and batchfile on Windows (#909)
It was using s:esc() which escapes spaces with a backslash.
This does not work on Windows.

&shell could be escaped on because of spaces.
See patch-8.0.1455 and related 8.1.x patches that address this
for $SHELL on Unix and git-bash on Windows.

Related #852, #908 
Close #890
2019-12-01 21:01:17 -05:00
Jan Edmund Lazo
68fef9c2fd
Delete batchfile only if it exists (#901)
Close #900
2019-11-03 21:10:37 -05:00
Daniel Hahler
eee50c55bf Use s:path with s:rtp always (#694)
Having a trailing slash with &rtp entries is problematic when removing
them later: if loading on demand is used, s:reorg_rtp might fail to
remove the previous runtime paths.

Test case has been using maktaba (which triggers unsetting s:middle in
s:reorg_rtp), but because of the trailing slashes being used, the
previous rtp entries were not removed.
2019-10-20 21:52:29 -04:00
Jan Edmund Lazo
96046c01c3
Detect WSL (Neovim only) (#887)
`has('wsl')` works since Neovim v0.3.0 (5d2dd2ebe2)

Fix: https://github.com/junegunn/vim-plug/issues/821
2019-10-14 13:38:26 -04:00
Jan Edmund Lazo
fcfd5b7e1f
Use chcp only if sed is in PATH (#891)
chcp parsing is fragile because of the system locale. There's no convenient way to parse out the codepage value without regex just by relying on cmd.exe builtins and default binaries in PATH.

Vim can be used to parse chcp output but it requires an additional `system` per `s:system` and `chcp` can change within the same console so caching the value won't work on the terminal.

Powershell supports regex but it has a long startup even with `-NoProfile` so running it when `&shell` is not powershell slows down `:PlugInstall` more.
2019-10-14 07:55:41 -04:00
Jan Edmund Lazo
849b76be90
Fix chcp parsing for the current codepage (#888)
Relying on delimiters or token positions is fragile.
Last value of 'chcp' output is always a number.
2019-10-03 21:19:11 -04:00
Roman Frołow
ff97806e50 Add path for Neovim on Windows (#789)
Neovim provides `stdpath` to abstract the directory paths that it uses based on the OS. It respects `XDG` specification on Linux and uses `%LOCALAPPDATA%` on Windows. 

1. Use `stdpath('data') . '/plugged'` for plugin directory.
2. Use `stdpath('config')` for user-config directory. This is `~/.config/nvim/` on Linux and `%LOCALAPPDATA%\nvim\` on Windows.
2019-09-28 20:30:50 -04:00
gh4w
68b31a4a66 output of chcp was not parsed correctly (#886)
* output of chcp was not parsed correctly

On Windows, when wrapping a batch command with the function s:wrap_cmds(),
when calling 'chcp' to get the current code page, the code assumed that
the output was in the format "active code page: XXX" (where XXX is the
code page), whereas the actual output is localized (for instance, in
French, the output would be: "page de code active: XXX").
The parsing of the output relied on that, and this failed for a
message different from "active code page" (i.e., English).

This patch changes the parsing to split the output of chcp on the colon
instead of spaces. Assuming that the output is always in the format
"<localized message>: XXX", regardless of the locale, hopefully, this is
a bit more robust.
2019-09-28 20:10:13 -04:00
Junegunn Choi
46f843aafe
Add collaborators section 2019-09-03 10:52:29 +09:00
Jan Edmund Lazo
ebd534c88b
Travis: use default image for osx (#871)
Fix https://travis-ci.org/junegunn/vim-plug/jobs/573145961#L211-L217
2019-08-17 16:51:07 -04:00
Jan Edmund Lazo
3b29e1e6e2 Travis: add macOS 10.14 (#870) 2019-08-18 00:44:24 +09:00
Jan Edmund Lazo
307b0f244d travis: add ubuntu bionic,xenial (#867)
Travis defaults to it since this year.
Ubuntu trusty reached EOL since April 2019.
Ubuntu bionic provides Vim 8.

Simplify OS install with Travis' apt addon
so that only Vim nightly will be compiled from source.

Ubuntu 14.04.6 provides ruby v.1.9.3, not 1.8.x or older.
Use it to test the ruby provider for backward compatibility.

Signed-off-by: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
2019-08-17 12:46:08 +09:00
Jan Edmund Lazo
8a44109329 Fix Windows support for Unix shells and powershell (#860)
Excerpt from `:h shell-powershell`:

  To use powershell (on Windows):

    set shell=powershell shellquote=( shellpipe=\| shellxquote=
    set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
    set shellredir=\|\ Out-File\ -Encoding\ UTF8
2019-08-16 17:55:17 +09:00
Minsoo Kim
0b32d2d23e Update YCM path: Valloric -> ycm-core (#869) 2019-08-13 23:15:51 +09:00
Jan Edmund Lazo
226d6abeb2 Don't override shell on Windows (#856)
Assume that the user set the shell options correctly
before running vim-plug so that the user can use bash or powershell
as their shell.

Close #815
2019-07-16 09:06:27 +09:00
Harry Moreno
fddbcb8f1a Change PlugClean description (#853)
Be more clear about uninstalling plugin directories.
2019-07-09 16:16:02 +09:00
Jan Edmund Lazo
f1ad2d864a Escape batchfile path on Windows (#850)
Close #832
2019-06-17 23:00:59 +02:00
Junegunn Choi
08e78d8a5e
Avoid downward search when using finddir
Close #750
2019-05-29 18:29:11 +09:00
Junegunn Choi
518a3566c3
Escape arguments to git command during PlugUpgrade
Fix #832
2019-04-11 17:53:13 +09:00
Daniel Hahler
d1c19a6fa9 Travis: rename vim72 to vim74 (#723) 2019-02-22 11:14:16 +09:00
Nate Fischer
734d9a11b5 Use 'rtp' option to filter diff (#798)
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`.
2018-11-04 03:00:00 +09:00
Junegunn Choi
b6050d6f03
Allow cloning into an empty directory (#782)
Close #766

We can rely on git to check if the destination directory is empty.
2018-09-12 13:45:38 +09:00
Junegunn Choi
7f8fdd0444
Ignore useless use of on-demand loading (#786) 2018-09-12 13:40:33 +09:00
Samuel D. Leslie
8ed2617ba0 Add support for parallel fetching of Git submodules (#784)
Git v2.8 introduced support for parallel fetching of submodules. This
can result in a substantial performance boost when performing a "git
submodule update" in a repository with many submodules, potentially
further magnified when updating submodules recursively.

This commit introduces a check on the Git version to see if it supports
parallel submodule fetching. If it does, we add the '--jobs=N' argument
to our call to "git submodule update", where N is g:plug_threads or the
vim-plug default of 16.
2018-09-06 14:48:54 +09:00
Árni Dagur
0a255ee62d Clear colorcolumn in vim-plug buffer (#779) 2018-08-08 10:52:00 +09:00
dohq
e0ca037a4f has('win32') is enough for detecting Windows (#765) 2018-06-20 18:18:50 +09:00
Junegunn Choi
f80eed7379
Add <plug>(plug-preview) map (#769)
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 #749
Close #768
2018-06-20 18:09:06 +09:00
WADA Takashi
fef4e434ba Fix Windows batch file format (#755)
`writefile()` always output LF without CR each lines.
But batch file on Windows needs CR and LF, at end of lines.

And if the path of home directory contains non-ASCII
characters like Japanese username (e.g. `C:\Users\太郎`),
batch file without CR can't be executed correctly.
2018-05-12 11:21:17 +09:00
Daniel Hahler
e6a775e0df Fix handling of changed up-to-date msg from Git (#724)
The msg was changed from 'Already up-to-date' to 'Already up to date'.
2018-03-04 13:43:13 +09:00
Junegunn Choi
96375cb7d3
Update README and add vim help file
Close #705
2017-11-27 00:58:29 +09:00
Junegunn Choi
2f4dc4d482
Add link to automatic installation instructions
Close #711
2017-11-27 00:15:46 +09:00
Daniel Hahler
9813d5ead5 Display not-loaded status with all plugins that have a dir (#547) 2017-10-15 18:12:15 +09:00
Junegunn Choi
ddc67fc136
Fix helptags generation for plugins with custom rtp
Close #684
2017-09-25 00:00:03 +09:00
Junegunn Choi
cd44b03db2
Remove extra quotes in PlugDiff output (#680) 2017-09-20 11:28:52 +09:00
Jan Edmund Lazo
4f95bce2f4 Fix PlugDiff for Windows (#681)
Close #680
2017-09-20 11:02:54 +09:00
Jan Edmund Lazo
7f96c98b0a Prepend 'silent' to ':!' to avoid hit-enter prompt (#678)
Close #606

Fix for GVim on Windows.
2017-09-19 13:53:35 +09:00
Jan Edmund Lazo
05c8983d1a Port fzf#shellescape (#676)
Close #635
Close #668
Close #539

Use a temporary batchfile for :!, system(), and jobs and run it in cmd.exe.
This bypasses Vim/Neovim issues in Windows and reduces the need to set more options.
Also, s:shellesc_cmd works in a batchfile only.

Set shellredir for system() in Windows
$SHELL sets the default value of 'shell' (see :h 'shell').
This affects shellredir but cmd.exe requires '>%s 2>&1'.
2017-09-19 10:37:22 +09:00
Junegunn Choi
b93975f794 Fix Travis CI build (dist: trusty) (#670) 2017-09-10 03:38:38 +09:00
Junegunn Choi
88cc9d7868 Create LICENSE 2017-07-10 13:21:14 +09:00
Andrew Pennebaker
cd39fa6133 Hard-wrap installation instructions for Windows (#649)
Long snippets are sometimes difficult to fully select in a Web browser.
Hard wrapping snippets to make them easier to grab.
2017-07-01 00:26:04 +09:00
Junegunn Choi
449b4f1ed6
Disallow using standard Vim plugin directory as plug home
Close #646
2017-06-27 17:44:12 +09:00
Junegunn Choi
802b100415
Extend plug#load to process a list of names instead of varargs
Allows `call plug#load(keys(g:plugs))` for manually loading all plugins
at once. Close #638.
2017-06-06 16:17:31 +09:00
Junegunn Choi
06992bcfb9 Update installation instruction for Neovim on Windows (#634)
Close #633
2017-05-19 03:17:46 +09:00
Junegunn Choi
f7e6a86807
Deprecate implicit vim-scripts expansion
vim-scripts.org is no longer maintained.

Close #625
2017-05-01 21:31:57 +09:00
Daniel Hahler
61ffb61615 Travis: VADER_OUTPUT_FILE=/dev/stderr for neovim (#618) 2017-04-17 02:47:15 +09:00
Daniel Hahler
9dcab48628 Load plugins only once in plug#load (#616)
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.
2017-04-17 02:46:02 +09:00
Andrew Nowak
1d3c88292b Fix invalid diagnosis of PlugStatus with wildcard tags (#619) 2017-04-14 10:13:49 +09:00
Justin M. Keyes
580f0a559c nvim: Enable job-control nvim 0.2+ (#617)
Closes #583
References https://github.com/neovim/neovim/pull/6497
2017-04-12 11:10:09 +09:00