3

I'm using Ubuntu 17.04. I've decided to start using Vim, so I needed a plugin manager. I found vim-plug and I really liked it. But I can't make it work. I followed the installation guide:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Created .vimrc and pasted:

call plug#begin()
Plug 'tpope/vim-sensible'
call plug#end()

But Vim gives me Errors:

Error detected while processing /home/keltar/.vimrc:
line    1:
E117: Unknown function: plug#begin
line    2:
E492: Not an editor command: Plug 'tpope/vim-sensible'
line    3:
E117: Unknown function: plug#end

What's wrong? Vim version is 8.0.95 .

:scriptames output:

  1: /usr/share/vim/vimrc
  2: /usr/share/vim/vim80/debian.vim
  3: /usr/share/vim/vim80/syntax/syntax.vim
  4: /usr/share/vim/vim80/syntax/synload.vim
  5: /usr/share/vim/vim80/syntax/syncolor.vim
  6: /usr/share/vim/vim80/filetype.vim
  7: ~/.vimrc
  8: /usr/share/vim/vim80/plugin/getscriptPlugin.vim
  9: /usr/share/vim/vim80/plugin/gzip.vim
 10: /usr/share/vim/vim80/plugin/logiPat.vim
 11: /usr/share/vim/vim80/plugin/manpager.vim
 12: /usr/share/vim/vim80/plugin/matchparen.vim
 13: /usr/share/vim/vim80/plugin/netrwPlugin.vim
 14: /usr/share/vim/vim80/plugin/rrhelper.vim
 15: /usr/share/vim/vim80/plugin/spellfile.vim
 16: /usr/share/vim/vim80/plugin/tarPlugin.vim
 17: /usr/share/vim/vim80/plugin/tohtml.vim
 18: /usr/share/vim/vim80/plugin/vimballPlugin.vim
 19: /usr/share/vim/vim80/plugin/zipPlugin.vim

ls -la ~/.vim/autoload output:

total 80
drwxr-x--- 2 root root  4096 Apr 19 22:22 .
drwxr-x--- 3 root root  4096 Apr 19 22:22 ..
-rw-r--r-- 1 root root 71885 Apr 20 09:32 plug.vim

closed as off-topic by grodzik, Tumbler41, Martin Tournoij Apr 21 '17 at 1:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers." – grodzik, Tumbler41, Martin Tournoij
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Did you checked that the curl command worked and that the file ~/.vim/autoload/plug.vim exists and contains the code of vim-plug? (Also I don't think this is relevant to your problem, but I don't know how the begin() command works without argument, you might want to use call plug#begin('~/.vim/plugged') as specified in the doc) – statox Apr 19 '17 at 14:10
  • @statox, Yes, that was a mistake, but it still gives the same error. – Keltar Helviett Apr 19 '17 at 23:30
  • What's the output of :scriptnames? – muru Apr 20 '17 at 2:59
  • @muru, I've added it to post. – Keltar Helviett Apr 20 '17 at 5:22
  • Can you add output of ls -la ~/.vim/autoload/? Also have you copy-pasted those lines to your .vimrc or typed them by hand? If you copy-pasted, maybe there's some strange sign in there, so would be good to remove those lines and type them by hand. – grodzik Apr 20 '17 at 7:06