Hello. I tried installing Vim-Plug following the github repository guide
https://github.com/junegunn/vim-plug
I ran
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
on the terminal.
~/.vim/autoload/plug.vim was created.
I also created ~/vim/plugged
Added
call plug#begin('~/.vim/plugged')
call plug#end()
to ~/.vimrc file.
now when I run Vim on vim I get this error:
Error detected while processing /home/marcelo/.vimrc:
line 90: E117: Unknown function: plug#begin
line 93: E117: Unknown function: plug#end Press ENTER or type command to continue
I've been through stackoverflow for over an hour and could'nt find anything helpful
if anyone has been through this before and solved it please help me out
Hello. I have the exact same issue. Could you solve the problem ?
bump suspecting that perhaps something has changed in Vim 8+ where the instructions for writing plugins might have a slight change...?
Possibly due to new implementation of native package management? Not experienced enough to say for certain..but the same issue has occured with pathogen and vim plug and my dirs are all good, so?
Help would be much appreciated!
I have soled this problem in my win10 machine. My way is setthe file plug.vim in the directory~\.vim\autoload\
Execute the following command from within vim and check if the plug.vim is listed:
:scriptnames
I'm working on the same error.
Here's what i see when i run
:scriptnames
```
1: /etc/vimrc
2: /usr/share/vim/vim74/syntax/syntax.vim
3: /usr/share/vim/vim74/syntax/synload.vim
4: /usr/share/vim/vim74/syntax/syncolor.vim
5: /usr/share/vim/vim74/filetype.vim
6: /usr/share/vim/vim74/ftplugin.vim
7: ~/.vim/vimrc
8: ~/.vim/autoload/plug.vim
9: /usr/share/vim/vim74/ftoff.vim
10: /usr/share/vim/vim74/indent.vim
11: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
12: /usr/share/vim/vim74/plugin/gzip.vim
13: /usr/share/vim/vim74/plugin/matchparen.vim
14: /usr/share/vim/vim74/plugin/netrwPlugin.vim
15: /usr/share/vim/vim74/plugin/rrhelper.vim
16: /usr/share/vim/vim74/plugin/spellfile.vim
17: /usr/share/vim/vim74/plugin/tarPlugin.vim
18: /usr/share/vim/vim74/plugin/tohtml.vim
19: /usr/share/vim/vim74/plugin/vimballPlugin.vim
20: /usr/share/vim/vim74/plugin/zipPlugin.vim
21: /usr/share/vim/vim74/scripts.vim
22: /usr/share/vim/vim74/syntax/vim.vim
23: /usr/share/vim/vim74/syntax/perl.vim
24: /usr/share/vim/vim74/syntax/pod.vim
25: /usr/share/vim/vim74/syntax/python.vim
26: /usr/share/vim/vim74/ftplugin/vim.vim
27: /usr/share/vim/vim74/indent/vim.vim
```
This looks right
~/.vim/autoload/plug.vim
I also encounter this problem. I followed the debugging method as mentioned in #245, and it all seems okay.
I did the installation by specifying my own rtp dir. Because I use vimr and vimr is using neovim.
curl -fLo ~/.config/nvim/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
And in the init.vim i added set rtp +=~/.config/nvim 1 line before before the call plug#begin ...
And it didn't work. I did :echo &rtp and it showed the dir I added.
I made it works by moving ~/.config/nvim/plug.vim to ~/.config/nvim/autoload/plug.vim after learning how Vundle managed to work on my vimr.
So, in your case, if after you run :echo &rtp and it doesn't show ~/.vim, maybe you should add
set rtp +=~/.vim
before call plug#begin...
I have no idea why it works on my machine, let me know if anyone knows why I have to put it on ~/.config/nvim/autoload
I have this problem in my raspberry pi.
At first I do not have the file ~/.vimrc, so I add the following lines
call plug#begin('~/.vim/plugged')
Plug 'foo'
call plug#end()
to /etc/vim/vimrc, it work well with command vi file_name but when it comes to sudo vi file_name, the error message appears
Error detected while processing /usr/share/vim/vimrc:
line 13: E117: Unknown function: plug#begin
line 15: E492: Not an editor command: Plug 'joshdick/onedark.vim'
line 16: E492: Not an editor command: Plug 'sheerun/vim-polyglot'
line 18: E117: Unknown function: plug#end
Press ENTER or type command to continue
So I delete these lines just added, cp /etc/vim/vimrc ~/.vimrc and add these lines to ~/.vimrc, then it work as I expect.
I also suffer this issue because of the permission on $HOME/.vim/autoload/ folder.
When I set the current user with chown -R $USER:$USER $HOME/.vim/autoload/, it works fine with vim command :).
Hello,
nothing here solves the problem for me. So: bump
Hello i had the same issue but i just found the solution all you have to do is,
go to
~/.config/nvim
then execute this command
then Enjoy.
This is what worked for me, in the directory ~/.vim/autoload , I moved the plug.vim there since it wasn't already there. After I added this, it still didn't work. So I used @akai54 's solution but I did the sudo chmod +rwx autoload in the ~/.vim directory instead and after that, everything worked fine. If there isn't an autoload folder already in the .vim directory, create one.
cd ~/.vim/
mkdir autoload
Move the plug.vim from the ~/.config/nvim to ~/.vim/autoload or:
sudo mv ~/.config/nvim/plug.vim ~/.vim/autoload
sudo chmod +rwx autoload/
This is what worked for me, in the directory ~/.vim/autoload , I moved the plug.vim there since it wasn't already there. After I added this, it still didn't work. So I used @akai54 's solution but I did the sudo chmod +rwx autoload in the ~/.vim directory instead and after that, everything worked fine. If there isn't an autoload folder already in the .vim directory, create one.
cd ~/.vim/
mkdir autoload
Move the plug.vim from the ~/.config/nvim to ~/.vim/autoload or:
sudo mv ~/.config/nvim/plug.vim ~/.vim/autoload
sudo chmod +rwx autoload/
It worked!!! ( i'm using kubuntu 20.04 )
This is what worked for me, in the directory ~/.vim/autoload , I moved the plug.vim there since it wasn't already there. After I added this, it still didn't work. So I used @akai54 's solution but I did the sudo chmod +rwx autoload in the ~/.vim directory instead and after that, everything worked fine. If there isn't an autoload folder already in the .vim directory, create one.
cd ~/.vim/
mkdir autoload
Move the plug.vim from the ~/.config/nvim to ~/.vim/autoload or:
sudo mv ~/.config/nvim/plug.vim ~/.vim/autoload
sudo chmod +rwx autoload/
I was having the same issue but I didn't like having an extra file in ~ because I only use nvim. Anyway ~/.config/nivm/autoload/ is a fine place to put it, the curl command on github puts it in ~/.config/nivm/site/autoload which did not work
This is what worked for me, in the directory ~/.vim/autoload , I moved the plug.vim there since it wasn't already there. After I added this, it still didn't work. So I used @akai54 's solution but I did the sudo chmod +rwx autoload in the ~/.vim directory instead and after that, everything worked fine. If there isn't an autoload folder already in the .vim directory, create one.
cd ~/.vim/
mkdir autoload
Move the plug.vim from the ~/.config/nvim to ~/.vim/autoload or:
sudo mv ~/.config/nvim/plug.vim ~/.vim/autoload
sudo chmod +rwx autoload/
thx bro, it worked. The reason why I got this problem is that I cloned all master branch in autoload instead of downloading plug.vim into autoload XD
Hola, mi problema era al rev茅s, tenia VIM funcionando con mis plugins pero NVIM no me cargaba los plugin y me daba el mismo error que inici贸 茅ste hilo, lo solucion茅 generando un enlace simb贸lico de la carpeta ~/.vim/autoloada la carpeta ~/.config/nvim/:
$ cd .config/nvim/
$ ln -s ~/.vim/autoload/ .
fix resuelto
mi PC: POP!_OS 20.04
I also suffer this issue because of the permission on
$HOME/.vim/autoload/folder.When I set the current user with
chown -R $USER:$USER $HOME/.vim/autoload/, it works fine withvimcommand :).
it did work.
Most helpful comment
I also encounter this problem. I followed the debugging method as mentioned in #245, and it all seems okay.
I did the installation by specifying my own rtp dir. Because I use vimr and vimr is using neovim.
And in the
init.vimi addedset rtp +=~/.config/nvim1 line before before thecall plug#begin ...And it didn't work. I did
:echo &rtpand it showed the dir I added.I made it works by moving
~/.config/nvim/plug.vimto~/.config/nvim/autoload/plug.vimafter learning how Vundle managed to work on my vimr.So, in your case, if after you run
:echo &rtpand it doesn't show~/.vim, maybe you should addbefore
call plug#begin...I have no idea why it works on my machine, let me know if anyone knows why I have to put it on
~/.config/nvim/autoload