Quick Reference
Essential commands and keybindings for LazyVim.
Commands
Plugin Management
| Command | Description |
:Lazy | Open plugin manager |
:Lazy sync | Install, clean, update plugins |
:Lazy update | Update plugins |
:Lazy restore | Restore from lockfile |
:Lazy profile | Startup profile |
:LazyExtras | Manage LazyVim extras |
LSP
| Command | Description |
:LspInfo | Show active LSP clients |
:LspStart | Start LSP |
:LspStop | Stop LSP |
:LspRestart | Restart LSP |
:Mason | LSP server manager |
Treesitter
| Command | Description |
:TSInstall <lang> | Install parser |
:TSUpdate | Update all parsers |
:TSInstallInfo | Show installed parsers |
Diagnostics
| Command | Description |
:checkhealth | Run health check |
:checkhealth lazy | Check lazy.nvim |
:checkhealth lsp | Check LSP |
Essential Keybindings
Navigation
| Key | Action |
| Space+Space | Find files |
| Space+/ | Search in files |
| Space+, | Switch buffer |
| Space+E | File explorer |
| G+D | Go to definition |
| G+R | Go to references |
Editing
| Key | Action |
| G+C+C | Toggle line comment |
| Space+C+A | Code actions |
| Space+C+R | Rename symbol |
| Space+C+F | Format buffer |
| Shift+K | Hover documentation |
Buffers & Windows
| Key | Action |
| Shift+H / Shift+L | Previous/next buffer |
| Space+B+D | Delete buffer |
| Ctrl+H+J+K+L | Navigate windows |
| Space+W+D | Delete window |
| Space+| | Split vertical |
| Space+- | Split horizontal |
Git
| Key | Action |
| Space+G+G | LazyGit |
| Space+G+B | Git blame |
| [+H / ]+H | Previous/next hunk |
| Space+G+S | Stage hunk |
| Space+G+R | Reset hunk |
UI Toggles
| Key | Action |
| Space+U+F | Toggle format on save |
| Space+U+L | Toggle line numbers |
| Space+U+W | Toggle word wrap |
| Space+U+S | Toggle spell check |
File Structure
~/.config/nvim/
├── init.lua # Entry point
├── lazy-lock.json # Plugin versions
├── lazyvim.json # Enabled extras
└── lua/
├── config/
│ ├── autocmds.lua # Auto commands
│ ├── keymaps.lua # Keybindings
│ ├── lazy.lua # Plugin manager
│ └── options.lua # Editor options
└── plugins/
└── *.lua # Custom plugins
Common Configuration
options.lua
-- Indentation
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
-- Line numbers
vim.opt.relativenumber = true
-- Search
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Python LSP
vim.g.lazyvim_python_lsp = "pyright"
vim.g.lazyvim_python_ruff = "ruff"
keymaps.lua
local map = vim.keymap.set
map("n", "<leader>w", "<cmd>w<cr>", { desc = "Save" })
map("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move down" })
map("v", "K", ":m '<-2<CR>gv=gv", { desc = "Move up" })
Adding Plugins
-- lua/plugins/example.lua
return {
"username/plugin-name",
event = "VeryLazy",
opts = {
-- configuration
},
}
Changing Colorscheme
-- lua/plugins/colorscheme.lua
return {
{ "catppuccin/nvim", name = "catppuccin" },
{
"LazyVim/LazyVim",
opts = { colorscheme = "catppuccin" },
},
}
Disabling Plugins
-- lua/plugins/disabled.lua
return {
{ "plugin-name", enabled = false },
}
LSP Configuration
-- lua/plugins/lsp.lua
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
pyright = {
settings = {
python = {
analysis = {
typeCheckingMode = "basic",
},
},
},
},
},
},
}
Telescope Controls
| Key | Action |
| Ctrl+J / Ctrl+K | Navigate |
| Enter | Open |
| Ctrl+X | Horizontal split |
| Ctrl+V | Vertical split |
| Tab | Toggle selection |
| Ctrl+Q | Send to quickfix |
Neo-tree Controls
| Key | Action |
| Enter | Open |
| A | Add file |
| D | Delete |
| R | Rename |
| Y | Copy name |
| . | Toggle hidden |
Vim Motions Cheatsheet
Movement
| Key | Action |
h j k l | Left, down, up, right |
w / b | Next/previous word |
e | End of word |
0 / $ | Start/end of line |
gg / G | Start/end of file |
{ / } | Previous/next paragraph |
% | Matching bracket |
Editing
| Key | Action |
i / a | Insert before/after |
I / A | Insert start/end of line |
o / O | New line below/above |
x | Delete character |
dd | Delete line |
yy | Yank line |
p / P | Paste after/before |
u | Undo |
Ctrl+r | Redo |
Text Objects
| Key | Description |
iw / aw | Inner/around word |
i" / a" | Inner/around quotes |
i( / a( | Inner/around parentheses |
i{ / a{ | Inner/around braces |
if / af | Inner/around function |
ic / ac | Inner/around class |
Operators
| Key | Action |
d | Delete |
c | Change |
y | Yank (copy) |
> / < | Indent |
= | Auto-indent |
Combine: diw (delete inner word), ci" (change inside quotes), yap (yank around paragraph)