Frequently Asked Question
How do I install Vim plugins with vim-plug or packer?
Vim has no built-in plugin manager, so the community has produced several. The
most widely used for classic Vim is vim-plug (by Junegunn Choi): a single
file you drop into ~/.vim/autoload/plug.vim. You then declare plugins in your
.vimrc between call plug#begin() and call plug#end(), each line naming a
GitHub repository like Plug 'tpope/vim-fugitive'. Run :PlugInstall inside Vim
and it clones each repository into ~/.vim/plugged/ and loads it.
For Neovim users, the historical equivalent was packer.nvim (written in Lua), which let you express the same idea with native Lua syntax. Packer was archived in 2023, and most users have since migrated to lazy.nvim, which adds lazy loading, lock files, and a polished UI for managing plugins. Other options include paq-nvim (minimalist) and the older Vundle and Pathogen for pure-Vim setups.
The classic plugins worth knowing exist regardless of manager: vim-fugitive
and gitsigns.nvim for Git, NERDTree or nvim-tree.lua for a file tree, fzf
or Telescope for fuzzy finding, ALE or built-in LSP for linting, and vim- surround or nvim-surround for editing matched pairs. The aggregate is
essentially a free IDE built on a 50-year-old editing model.