Skip to content

Neovim + LazyVim ​

LazyVim is a modern, fast, and pre-configured Neovim distribution built around the lazy.nvim plugin manager. This cheatsheet highlights the most essential LazyVim default keymaps, LSP navigations, buffer controls, and UI toggles.

TIP

The default <leader> key in LazyVim is Space. The default <localleader> is \. Pressing <space> will trigger a Which-Key popup at the bottom of the screen showing all available next-key actions.


1. General & Window Navigation ​

These maps optimize movement, window swapping, and line operations.

KeymapModeAction / Description
j / kNormal, VisualBetter up/down movement (wraps on display lines instead of logical lines)
<C-h>NormalMove to left window / split
<C-j>NormalMove to lower window / split
<C-k>NormalMove to upper window / split
<C-l>NormalMove to right window / split
<C-Up> / <C-Down>NormalIncrease / decrease window height
<C-Left> / <C-Right>NormalDecrease / increase window width
<A-j> / <A-k>Normal, InsertMove current line down / up
<A-j> / <A-k>VisualMove selected block down / up
< / >VisualIndent left / right (stays in Visual mode)
n / NNormal, Vis, OpNext / Previous search result (auto-centers cursor and opens folds)
<esc>Normal, Ins, SnipClear search highlight (noh) and stop snippet active expansion
<leader>urNormalRedraw screen, clear search highlight, and update diffs

2. Buffer & Tab Management ​

LazyVim manages buffers using bufferline.nvim and provides shortcuts to navigate and clean up files quickly.

Buffer Controls ​

KeymapModeAction / Description
<S-h> or [bNormalGo to previous buffer
<S-l> or ]bNormalGo to next buffer
<leader>bb or ``<leader>```NormalSwitch to other (last active) buffer
<leader>bdNormalDelete (close) active buffer safely (keeps window layout)
<leader>boNormalDelete all other buffers
<leader>biNormalDelete all invisible buffers
<leader>bDNormalDelete buffer and close current window

Tab Controls ​

KeymapModeAction / Description
<leader><tab><tab>NormalCreate new tab
<leader><tab>dNormalClose current tab
<leader><tab>]NormalGo to next tab
<leader><tab>[NormalGo to previous tab
<leader><tab>oNormalClose all other tabs
<leader><tab>fNormalGo to first tab
<leader><tab>lNormalGo to last tab

3. Search & Fuzzy Finding (via Snacks.picker) ​

LazyVim utilizes snacks.nvim for fast fuzzy finding, grep searching, and workspace exploration.

KeymapModeAction / Description
<leader><space>NormalFind files in the project root directory
<leader>,NormalList and switch between open buffers
<leader>/NormalGrep search for a string across all project files (from root)
<leader>:NormalOpen command history
<leader>ffNormalFind files (root directory)
<leader>fFNormalFind files (current working directory - cwd)
<leader>fcNormalFind and edit Neovim configuration files
<leader>fnNormalCreate new empty buffer/file
<leader>frNormalOpen recent files history
<leader>fRNormalOpen recent files history (cwd specific)
<leader>fpNormalSelect and open recent projects
<leader>sgNormalLive grep search (root directory)
<leader>sGNormalLive grep search (cwd specific)
<leader>swNormal, VisSearch word/selection under cursor (root directory)
<leader>sWNormal, VisSearch word/selection under cursor (cwd specific)
<leader>shNormalSearch Neovim help pages
<leader>skNormalSearch active keymaps and documentation
<leader>s"NormalSearch registers
<leader>s/NormalSearch history

4. LSP (Language Server Protocol) & Coding ​

Powerful integrations for editing code, navigating syntax trees, and refactoring.

LSP Navigation ​

KeymapModeAction / Description
gdNormalGoto Definition
grNormalGoto References
gINormalGoto Implementation
gyNormalGoto Type Definition
gDNormalGoto Declaration
KNormalShow hover documentation (LSP Info)
gKNormalShow signature help
<C-k>InsertShow signature help while typing

LSP Refactoring & Actions ​

KeymapModeAction / Description
<leader>caNormal, VisOpen Code Actions (quick fixes, imports, etc.)
<leader>crNormalRename variable / symbol (renames across project if supported)
<leader>cfNormal, VisFormat buffer (or visual selection) via conform.nvim
<leader>ssNormalSearch document LSP symbols
<leader>sSNormalSearch workspace LSP symbols
gai / gaoNormalView incoming / outgoing LSP call hierarchy

Diagnostics ​

KeymapModeAction / Description
<leader>cdNormalOpen diagnostic popup for current line
]d / [dNormalGo to next / previous diagnostic
]e / [eNormalGo to next / previous diagnostic error
]w / [wNormalGo to next / previous diagnostic warning

5. Git Integration (via Snacks & Lazygit) ​

LazyVim integrates git operations using Snacks and provides built-in support for Lazygit.

KeymapModeAction / Description
<leader>ggNormalToggle Lazygit (in repository root)
<leader>gGNormalToggle Lazygit (in current working directory)
<leader>glNormalGit log
<leader>gLNormalGit log (cwd specific)
<leader>gbNormalView git blame annotations for the current line
<leader>gfNormalView current file history
<leader>gBNormal, VisOpen git provider web interface for current repository
<leader>gYNormal, VisCopy git provider URL for current file to system clipboard

6. UI & Editor Toggles (via <leader>u) ​

These toggles quickly turn Neovim options or plugin features on or off without writing lua configuration.

KeymapToggle TargetKeymapToggle Target
<leader>ufAuto Format (Global)<leader>uFAuto Format (Buffer-local)
<leader>usSpell Check<leader>uwLine wrapping
<leader>ulLine Numbers (Absolute)<leader>uLRelative Line Numbers
<leader>udDiagnostics<leader>ucConceal Level
<leader>uhLSP Inlay Hints<leader>utTreesitter Highlighting
<leader>ubDark Background Toggle<leader>uDDimming of inactive code block
<leader>uzZen Mode<leader>wm or <leader>uZZoom Window (Maximize split toggle)

7. Useful Plugins & Extra Keymaps ​

Keymaps for some of the most popular plugins included with LazyVim:

Flash.nvim (Seamless Jumping) ​

  • s : Initiate Leap-style jumping. Press 2 characters, then choose the label.
  • S : Search for treesitter node selections to jump.
  • r / R : Start Leap visual selection / jump in visual mode.
  • <C-s> : Toggle flash searching while typing an ordinary search /.

Trouble.nvim (Diagnostics & Quick Lists) ​

  • <leader>xx : Toggle Trouble workspace diagnostics.
  • <leader>xX : Toggle Trouble document diagnostics.
  • <leader>cs : Toggle Trouble LSP symbols view.
  • <leader>xL : Toggle Trouble location list.
  • <leader>xQ : Toggle Trouble quickfix list.

Todo-Comments.nvim ​

  • ]t / [t : Jump to next/previous TODO/FIXME comment.
  • <leader>st : Search TODOs in snacks picker.
  • <leader>xt : Show Trouble view list for all TODOs.

8. Managing Plugins & Neovim Configuration ​

CommandAction
<leader>lOpen Lazy plugin manager window (install, update, clean plugins)
<leader>cmOpen Mason package manager (install LSPs, formatters, linters, debuggers)
<leader>LView LazyVim News & Changelog