1

I am trying to setup my terminal. my .vimrc file was working without issue and I was able to see all the plugins.

However after I installed ohmyzsh I am getting following error.

E492: Not an editor command: Plug 'vim-airline/vim-airline'

This is how my .vimrc files look.

set t_Co=256
" Vim-plug initialization
" Avoid modify this section, unless you are very sure of what you are doing

let vim_plug_just_installed = 0
let vim_plug_path = expand('~/.vim/autoload/plug.vim')
if !filereadable(vim_plug_path)
    echo "Installing Vim-plug..."
    echo ""
    silent !mkdir -p ~/.vim/autoload
    silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    let vim_plug_just_installed = 1
endif

" manually load vim-plug the first time
if vim_plug_just_installed
    :execute 'source '.fnameescape(vim_plug_path)
endif

" this needs to be here, so vim-plug knows we are declaring the plugins we
" want to use
call plug#begin('~/.vim/plugged')

" Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()

Gaurang Shah
  • 11,764
  • 9
  • 74
  • 137
  • You might have more than one `vimrc` which may be conflicting in some way. For instance when I open vim and type `:version`, I see `system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc"` – compuphys Apr 25 '20 at 20:53

0 Answers0