Plugin Managers & Ecosystem
Install, configure and discover plugins with vim-plug / packer / lazy.
Code
" --- vim-plug (classic Vim) ---
" ~/.vimrc
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
call plug#end()
" Install: :PlugInstall | Update: :PlugUpdate | Clean: :PlugClean
" --- lazy.nvim (modern Neovim) ---
" ~/.config/nvim/init.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
{ "neovim/nvim-lspconfig" },
}, {})
" Must-know plugins
" tpope/vim-surround cs"' changes surrounding quotes
" tpope/vim-fugitive :Git wrapper
" tpope/vim-commentary gcc toggles comment
" lewis6991/gitsigns.nvim git gutter
" nvim-lualine/lualine.nvim statuslineExplanation
Vim plugins extend functionality. vim-plug (classic) and lazy.nvim (modern Neovim) are the popular managers — both clone plugins to a local directory and let you declare them in your config. :PlugInstall/:Lazy sync install. The tpope/ suite (surround, fugitive, commentary, repeat) is considered essential. For fuzzy finding, fzf.vim (Vim) or Telescope (Neovim) are standard. Always pin plugin URLs and read the README's required config — most need a setup() call or :h <plugin> settings. Keep configs in version control for portability.
More Vim Snippets
Buffers, Windows & Tabs
Edit multiple files with buffers, split windows, and tab pages.
Search & Substitute
Find text with / and replace with :s, leveraging regex and ranges.
Registers (Multi-Clipboard)
Store yanks/deletes in named registers and paste from them.
Marks (Bookmarks)
Jump back to positions in a file or across files with marks.
Macros (Recorded Keystrokes)
Record a sequence of keys and replay it to automate repetitive edits.
Folding (Collapse Code)
Hide regions of code to focus on structure with fold methods.