Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install vim plug ? #120

Closed
suvirbhargav opened this issue Nov 13, 2014 · 15 comments
Closed

How to install vim plug ? #120

suvirbhargav opened this issue Nov 13, 2014 · 15 comments

Comments

@suvirbhargav
Copy link

Hi,

I added the setup file to auto load folder. Now i'm getting the error: Not an editor command: PlugInstall
As i see, you do call : plug#begin('~/.vim/plugged')
But my vim folder has no plugged directory. Do i need to install anything else to get the plug.

Regards
Suvir

@vheon
Copy link
Contributor

vheon commented Nov 13, 2014

I added the setup file to auto load folder.

I don't understand this part.

For the plugged directory: vim-plug will create it for you if it doesn't exists.

@suvirbhargav
Copy link
Author

i meant i did the following steps:
Step 1:
mkdir -p ~/.vim/autoload curl -fLo ~/.vim/autoload/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Step 2: Added the following to my vimrc (copied from vimplug github page)

call plug#begin('~/.vim/plugged')

" Make sure you use single quotes
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/vim-easy-align'

" 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': 'go.weekly.2012-03-13', '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()

Step 3: i opened the vim and executed the command : PlugInstall and i got the error Not an editor command: PlugInstall

@suvirbhargav suvirbhargav changed the title install steps How to install vim plug ? Nov 13, 2014
@junegunn
Copy link
Owner

  1. Make sure plug.vim file is located in ~/.vim/autoload directory.
  2. You are not supposed to copy/paste the whole example to your .vimrc. It's just some examples to show the syntax of vim-plug.
  3. Does :call plug#begin('~/.vim/plugged') give you an error?

@suvirbhargav
Copy link
Author

Yes, Checked step 1.
For the step 2., although i did copy/paste, it is just to get the setup up and running.

I did your step 3. No error, but nothing happens. Here is the screenshot.
screenshot from 2014-11-14 11 07 52

This is how my .vim looks like

Latitude-E5520:~/.vim$ ls -> autoload bundle conque_2.3 syntax

@suvirbhargav
Copy link
Author

Very nice plugin manager there!
I got it working. I think, yesterday the commands in .vimrc wasn't saved, so nothing worked. My bad. Now I also tested both PlugInstall and PlugUpdate. Works fine. Only YouCompleteme fails, all else pass. Here is the output.

screenshot from 2014-11-14 11 37 46

Thanks!

@junegunn
Copy link
Owner

Okay, looks like the post-update hook of YCM failed for some reason, you might want to manually execute the command to see what is going on.

@kingluddite
Copy link

I wasted two hours on this and could not figure it out. I'm embarrassed to share but hope my ignorance will save others time. I switched from Vundle to Plug and when I was trying to install plugins I was typing :PluginInstall instead of :PlugInstall

Shameful in Shangrila

@benfranklin79
Copy link

@kingluddite Just to make you feel better I did something similar when switching from Vundle to Plug. I didn't spend two hours but long enough to feel some degree of shame.

@kingluddite
Copy link

@benfranklin79 Misery loves company. Thanks for electricity.

@rebuilt
Copy link

rebuilt commented Jan 6, 2020

I was also having trouble installing on a new machine. The :PlugInstall command did not work. I corrected the issue by installing git before running :PlugInstall.

@aseemxandr
Copy link

I wasted two hours on this and could not figure it out. I'm embarrassed to share but hope my ignorance will save others time. I switched from Vundle to Plug and when I was trying to install plugins I was typing :PluginInstall instead of :PlugInstall

Shameful in Shangrila

Do I type PlugInstall in VIM or in terminal
In Vim is get error not an editor command : PlugInstall
In terminal I get error PlugInstall: command not found

@janlazo
Copy link
Contributor

janlazo commented Mar 12, 2020

I wasted two hours on this and could not figure it out. I'm embarrassed to share but hope my ignorance will save others time. I switched from Vundle to Plug and when I was trying to install plugins I was typing :PluginInstall instead of :PlugInstall
Shameful in Shangrila

Do I type PlugInstall in VIM or in terminal
In Vim is get error not an editor command : PlugInstall
In terminal I get error PlugInstall: command not found

@aseemxandr You do not have autoload/ in your ~/.vim or you did not put download https://github.com/junegunn/vim-plug/raw/master/plug.vim and put it in ~/.vim/autoload/plug.vim or you silenced errors from vim-plug because plug#begin() will not define :PlugInstall command if git is missing or your Vim build is missing some features. If vim-plug is installed correctly and your environment and Vim build are all good, then you can run PlugInstall after call plug#end().

@harvey-wei
Copy link

I wasted two hours on this and could not figure it out. I'm embarrassed to share but hope my ignorance will save others time. I switched from Vundle to Plug and when I was trying to install plugins I was typing :PluginInstall instead of :PlugInstall
Shameful in Shangrila

Do I type PlugInstall in VIM or in terminal
In Vim is get error not an editor command : PlugInstall
In terminal I get error PlugInstall: command not found

@aseemxandr You do not have autoload/ in your ~/.vim or you did not put download https://github.com/junegunn/vim-plug/raw/master/plug.vim and put it in ~/.vim/autoload/plug.vim or you silenced errors from vim-plug because plug#begin() will not define :PlugInstall command if git is missing or your Vim build is missing some features. If vim-plug is installed correctly and your environment and Vim build are all good, then you can run PlugInstall after call plug#end().

Thanks a lot ! Installing git fixes this issue!

@chrisseanhayes
Copy link

WINDOWS USERS
whenever you see a file ref to ~/.vim change it to ~/vimfiles
vim is looking for these file in a different folder when on Windows

@ppdouble
Copy link

ppdouble commented Aug 28, 2021

I was trying to install wakatime/vim-wakatime using vim-plugin.

Download and install with:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Now plug.vim was installed in ~/.vim/autoload/ folder.

  1. Modify ~/.vimrc with:
""""""""
" for vim-plug plugin manager
call plug#begin()
Plug 'wakatime/vim-wakatime'
call plug#end()
  1. In vim, run :so ~/.vimrc
  2. Re-open vim with proxy like ALL_PROXY=socks5://127.0.0.1:1080 vim
  3. run :PlugInstall in vim
    And vim-waktime is installed in ~/.vim/plugged folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests