I've been following this video tutorial, to install some VIM plugins in order to change the text colors in my VIM editor, especially to make comments brighter color.
I've created .vimrc
file. It looks like this:
1
2 set nocompatible " Set compatibility to Vim only
3
4 set number " Show line numbers
5
6 set wrap " Automatically wrap text that extends beyond the screen length
7
8 set laststatus=2 " Show status bar
9
10 set encoding=utf-8 " Force encoding
11
12 " Call the .vimrc.plug file
13 if filereadable(expand("~/.vimrc.plug"))
14 source "~/.vimrc.plug"
15 endif
16
17 ":inoremap <Caps> <Esc>
18 ":inoremap <Caps_Lock> <Esc>
19 ":inoremap <CapsLock> <Esc>
20
I've created .vimrc.plug
file. It looks like this:
1 call plug#begin('~/.vim/plugged')
2
3 "Fugitive Vim Github Wrapper
4 Plug 'tpope/vim-fugitive'
5
6 call plug#end()
Later I've executed command:
sudo curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Yes. I've checked I have git
installed.
I've opened vim
and gave command :PlugInstall
.
In the output I get E492: Not an editor command: PlugInstall
.
How to enable those VIM plugins?
I have also got other errors after I've run simple vim
command:
michal@ubuntu:~$ vim
Error detected while processing /home/michal/.vimrc[14]../home/michal/.vimrc.plug:
line 2:
E117: Unknown function: plug#begin
line 5:
E492: Not an editor command: Plug 'tpope/vim-fugitive'
line 7:
E117: Unknown function: plug#end
Press ENTER or type command to continue
if filereadable(expand("~/.vimrc.plug")) / source ~/.vimrc.plug / endif
. Right? – michal roesler Dec 14 '22 at 17:23