Skip to main content
Vim supports plugins to extend its functionality.
- Here are a few popular plugin managers
- Install Plug by adding the following lines to your `.vimrc`:
```
" Install Plug if not already installed
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
``` - Define your plugins:
```
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-commentary'
Plug 'vim-airline/vim-airline'
" Add more plugins as desired
call plug#end()
``` - Save your `.vimrc` and run Vim.
- Inside Vim, run `:PlugInstall` to install the defined plugins.