I recently installed vim-plug using the following settings
mkdir -p ~/.vim/autoload
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
and my vimrc file has following content
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/vim-easy-align'
" Group dependencies, vim-snippets depends on ultisnips
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using git URL
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes | ./install' }
" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'
call plug#end()
i am getting this error when i try to restart my vim
Error detected while processing C:\Users\hp_vimrc:
line 59:
E117: Unknown function: plug#begin
line 62:
E492: Not an editor command: Plug 'junegunn/seoul256.vim'
line 63:
E492: Not an editor command: Plug 'junegunn/vim-easy-alig
n'
line 66:
E492: Not an editor command: Plug 'SirVer/ultisnips' | Plug
'honza/vim-snippets'
line 69:
E492: Not an editor command: Plug 'scrooloose/nerdtree', {
'on': 'NERDTreeToggle' }
line 70:
E492: Not an editor command: Plug 'tpope/vim-fireplace', {
'for': 'clojure' }
line 73:
E492: Not an editor command: Plug 'https://github.com/june
gunn/vim-github-dashboard.git'
line 76:
E492: Not an editor command: Plug 'nsf/gocode', { 'tag':
'v.20150303', 'rtp': 'vim' }
line 79:
E492: Not an editor command: Plug 'junegunn/fzf', { 'dir':
'~/.fzf', 'do': 'yes | ./install' }
line 82:
E492: Not an editor command: Plug '~/my-prototype-plugin
'
line 84:
E117: Unknown function: plug#end
Please tell me what is the solution??? how can i make it work?
Looks like you're on windows, then you'll have to download plug.vim inside ~/vimfiles/autoload. Also you might want to pass ~/vimfiles/plugged to plug#begin().
And please note that all the Plug commands you copied from the readme page are just examples and you don't need them.
wow amazing i rename .vim folder to vimfiles and now i just got 1 error that the error
git executable not found. vim-plug requires git.
I installed git but still getting this error..
Plug is working i just add path of git in my environment variables of windows 7... thanks for your reply but can you tell me why we can't use vim with .vim instead of vimfiles....?
See :help vimfiles for the details.
@RanaZubair I have git for windows but I can't see where its installed since its git bash. How did you add it toyour path?
@junegunn I have same case, windows xp , rename .vim to vimfiles. It been ok.
I had the same problem, error E117. I solved changing permissions to .vim/autoload. I did
sudo chmod 777 autoload
No more errors on unknown function plug#begin and plug#end
Most helpful comment
Looks like you're on windows, then you'll have to download plug.vim inside
~/vimfiles/autoload. Also you might want to pass~/vimfiles/pluggedtoplug#begin().And please note that all the
Plugcommands you copied from the readme page are just examples and you don't need them.