Essential Keybindings
The keybindings every LazyVim user should know. Master these first and you will be productive in any codebase. Each section below covers a core workflow.
LSP
Go to Definition
'g' prefix generally means 'go to' in vim. 'd' = definition.
Go to Declaration
Capital D for declaration (where the symbol is declared, not defined).
References
g for go, r for references. Find all usages of the symbol under cursor.
Go to Implementation
Capital I for implementation. Useful for interfaces and abstract classes.
Go to Type Definition
g for go, y for type (t was taken). Jumps to the type of the symbol.
Hover Info
K shows documentation/hover info. Press again to enter the hover window.
Signature Help
g + K for signature help. Shows function parameter info while typing.
Code Action
c for code, a for action. Quick fixes, refactors, and imports.
Rename
c for code, r for rename. Renames the symbol across all files.
Search
Find Files
The double-f stands for 'find files'. Leader defaults to Space.
Live Grep
f for find, g for grep. Searches file contents across the project.
Buffers
f for find, b for buffers. Quick-switch between open files.
Switch Buffer
Comma is the quickest way to switch buffers. Shows a fuzzy list of open files.
Grep (Root Dir)
s for search, g for grep. Live grep across all project files — the IDE-like search.
Search and Replace
s for search, r for replace. Project-wide search and replace with preview. In visual mode, pre-fills the selection.
Navigation
Go to Left Window
Ctrl + h/j/k/l mirrors vim motion keys for window navigation.
Prev Buffer
H (left) for previous buffer. Think of buffers as a horizontal list.
Next Buffer
L (right) for next buffer. Pairs with H for quick buffer switching.
Flash Jump
s starts Flash jump. Type a few chars and pick a label to teleport.
Editing
Toggle Line Comment
gc is the comment operator. gcc applies it to the current line.
Toggle Comment
gc in visual mode comments/uncomments the selected lines.
Save File
Ctrl + s saves, familiar from other editors. Works in all modes.
Git
LazyGit
LazyGit is a full TUI Git client that opens in a floating window.
UI
Explorer (Root Dir)
Just e for explorer. Opens the file tree at project root.