Просмотр исходного кода

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.
Roman Frołow 6 лет назад
Родитель
Сommit
ff97806e50
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      README.md

+ 2 - 2
README.md

@@ -90,7 +90,7 @@ $uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
 
 ### 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. 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
 " Specify a directory for plugins
-" - For Neovim: ~/.local/share/nvim/plugged
+" - For Neovim: stdpath('data') . '/plugged'
 " - Avoid using standard Vim directory names like 'plugin'
 call plug#begin('~/.vim/plugged')