Make automatic installation script in wiki tips compatible to windows
- Dominant language
- Vim Script
- Stars
- 35.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Current [automatic installation script in wiki](https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation) is not compatible with Windows, mostly due to these two problems:
1. `autoload` should be in `~/vimfiles` instead of `~/.vim` on Windows.
2. The cURL comes with Windows (namely `C:/Windows/System32/curl.exe`) and cmd.exe/PowerShell will not expand `~` with `!` invocation.
I wrote a compatible version, tested to solve these two problems, making it compatible with Windows:
```vim
let data_dir = has('nvim') ? stdpath('data') . '/site' : has('win32') ? '~/vimfiles' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.fnamemodify(data_dir.'/autoload/plug.vim', ':p:S').' --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
```
Only few words changed.
If we get this updated to wiki, we can benefit the users.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.