Vim-plug: How am I supposed to user vim-plug with Windows - PowerShell?

Created on 16 May 2017  路  4Comments  路  Source: junegunn/vim-plug

I have Windows 10 Pro (x64) with NeoVim installed. I downloaded vim-plug using instructions from readme:

md ~\vimfiles\autoload
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
(New-Object Net.WebClient).DownloadFile($uri, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("~\vimfiles\autoload\plug.vim"))

My vim file is minimal example from readme:

" Specify a directory for plugins (for Neovim: ~/.local/share/nvim/plugged)
call plug#begin('~/vimfiles/plugged')

" Make sure you use single quotes

" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'

" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'

" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'

" On-demand loading
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }

" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }

" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }

" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }

" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'

" Initialize plugin system
call plug#end()

Error launching nvim is following:

PS C:\Users\Marko> nvim

Error detected while processing C:\Users\Marko\AppData\Local\nvim\init.vim:
line    8:
E117: Unknown function: plug#begin
line   13:
E492: Not an editor command: Plug 'junegunn/vim-easy-align'
line   16:
E492: Not an editor command: Plug 'https://github.com/junegunn/vim-github-dashboard.git'
line   19:
E492: Not an editor command: Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
line   22:
E492: Not an editor command: Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
line   23:
E492: Not an editor command: Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
line   26:
E492: Not an editor command: Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
line   29:
E492: Not an editor command: Plug 'fatih/vim-go', { 'tag': '*' }
line   32:
E492: Not an editor command: Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
line   35:
E492: Not an editor command: Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
line   38:
E492: Not an editor command: Plug '~/my-prototype-plugin'
line   41:
E117: Unknown function: plug#end
Press ENTER or type command to continue

It doesn't seem like it loaded vim-plug. Also, I can't use ENTER or any command, I can only break it with Ctrl+C. But this is neovim issue I guess.

I guess problematic part is call plug#begin('~/vimfiles/plugged'). To what I need to change it to get it working?


NeoVim version: NVIM v0.2.1-25-g2e3b78d1

  • Type:

    • [ ] Bug

    • [ ] Enhancement

    • [ ] Feature Request

    • [x] Question

  • OS:

    • [ ] All/Other

    • [ ] Linux

    • [ ] OS X

    • [x] Windows

  • Vim:

    • [ ] Terminal Vim

    • [ ] GVim

    • [x] Neovim

neovim windows

Most helpful comment

Neovim doesn't load files in ~\vimfiles\autoload, the installation instruction for Windows was written when Neovim didn't officially support Windows. I suppose plug.vim should be placed under ~\AppData\Local\nvim\autoload. @justinmk, can you confirm this?

All 4 comments

Neovim doesn't load files in ~\vimfiles\autoload, the installation instruction for Windows was written when Neovim didn't officially support Windows. I suppose plug.vim should be placed under ~\AppData\Local\nvim\autoload. @justinmk, can you confirm this?

That looks right. See :help base-directories when in doubt.

@xmudrii Please follow the new instruction below and see if it fixes the problem.

https://github.com/junegunn/vim-plug/blob/0c5f0b0528a8d7b9ced56b8f177e98f0ba4d7153/README.md#neovim

@junegunn @justinmk Thank you very much both, it works perfectly with new instructions 馃帀

Closing the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jdhao picture jdhao  路  11Comments

vicaya picture vicaya  路  23Comments

chemzqm picture chemzqm  路  9Comments

zoqaeski picture zoqaeski  路  10Comments

nickvanderstel picture nickvanderstel  路  15Comments