Install vim-plug for Neovim

komildeveloper, neovim
Back

vim-plug


What is vim-plug? 🤔

Pros.


Install vim-plug for Neovim

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

Create vim-plug folder and plugins.vim file

mkdir ~/.config/nvim/vim-plug
touch ~/.config/nvim/vim-plug/plugins.vim

Following to plugins.vim

" Automatic installation
if empty(glob('~/.config/nvim/autoload/plug.vim'))
  silent execute '!curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  autocmd VimEnter * PlugInstall
endif

call plug#begin('~/.config/nvim/autoload/plugged')

" NERDTree file system explorer
Plug 'scrooloose/nerdtree'

" Autopairs
Plug 'jiangmiao/auto-pairs'

" Best syntax and indentation support
Plug 'sheerun/vim-polyglot'

call plug#end()

Source in init.vim

source $HOME/.config/nvim/vim-plug/plugins.vim

Reload nvim and :PlugInstall to install plugins

NOTE: Another vim-plug tips


Commands

© Komil Developer.