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.
This commit is contained in:
Roman Frołow 2019-09-29 02:30:50 +02:00 committed by Jan Edmund Lazo
parent 68b31a4a66
commit ff97806e50

View File

@ -90,7 +90,7 @@ $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
### Usage ### Usage
Add a vim-plug section to your `~/.vimrc` (or `~/.config/nvim/init.vim` for Neovim): Add a vim-plug section to your `~/.vimrc` (or `stdpath('config') . '/init.vim'` for Neovim)
1. Begin the section with `call plug#begin()` 1. Begin the section with `call plug#begin()`
1. List the plugins with `Plug` commands 1. List the plugins with `Plug` commands
@ -102,7 +102,7 @@ Add a vim-plug section to your `~/.vimrc` (or `~/.config/nvim/init.vim` for Neov
```vim ```vim
" Specify a directory for plugins " Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged " - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin' " - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')