Neovim
From EdWiki
Revision as of 03:55, 21 February 2021 by Jshankar (Talk | contribs) (Created page with "__NOTOC__ == Plugins with Vim-Plug == === Installing Neovim === * On Mac brew install neovim * Ubuntu sudo apt install neovim * Arch sudo pacman -S neovim ==== Create...")
Plugins with Vim-Plug
Installing Neovim
- On Mac
brew install neovim
- Ubuntu
sudo apt install neovim
- Arch
sudo pacman -S neovim
Create config
Make directory for your Neovim config
mkdir ~/.config/nvim
Create an init.vim file
touch ~/.config/nvim/init.vim
Install vim-plug
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
You should now have plug.vim in your autoload directory so it will load of on start
Add a new file for plugins
We will manage our plugins in a separate file for the sake of my own sanity
mkdir ~/.config/nvim/vim-plug touch ~/.config/nvim/vim-plug/plugins.vim
Let's add some plugins
Add the following to ~/.config/nvim/vim-plug/plugins.vim
" auto-install vim-plug
if empty(glob('~/.config/vim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"autocmd VimEnter * PlugInstall
"autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/autoload/plugged')
" Better Syntax Support
Plug 'sheerun/vim-polyglot'
" File Explorer
Plug 'scrooloose/NERDTree'
" Auto pairs for '(' '[' '{'
Plug 'jiangmiao/auto-pairs'
call plug#end()