From ff97806e50196d56b2858cd56bada9d48cada2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Fro=C5=82ow?= Date: Sun, 29 Sep 2019 02:30:50 +0200 Subject: [PATCH] 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. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f791e0a..bad081d 100644 --- a/README.md +++ b/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')