LazyVim Keys

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

gd

Go to Definition

'g' prefix generally means 'go to' in vim. 'd' = definition.

NLSP
gD

Go to Declaration

Capital D for declaration (where the symbol is declared, not defined).

NLSP
gr

References

g for go, r for references. Find all usages of the symbol under cursor.

NLSP
gI

Go to Implementation

Capital I for implementation. Useful for interfaces and abstract classes.

NLSP
gy

Go to Type Definition

g for go, y for type (t was taken). Jumps to the type of the symbol.

NLSP
K

Hover Info

K shows documentation/hover info. Press again to enter the hover window.

NLSP
gK

Signature Help

g + K for signature help. Shows function parameter info while typing.

NLSP
<leader>ca

Code Action

c for code, a for action. Quick fixes, refactors, and imports.

NVLSP
<leader>cr

Rename

c for code, r for rename. Renames the symbol across all files.

NLSP

Search

<leader>ff

Find Files

The double-f stands for 'find files'. Leader defaults to Space.

NSearch
<leader>fg

Live Grep

f for find, g for grep. Searches file contents across the project.

NSearch
<leader>fb

Buffers

f for find, b for buffers. Quick-switch between open files.

NSearch
<leader>,

Switch Buffer

Comma is the quickest way to switch buffers. Shows a fuzzy list of open files.

NSearch
<leader>sg

Grep (Root Dir)

s for search, g for grep. Live grep across all project files — the IDE-like search.

NSearch
<leader>sr

Search and Replace

s for search, r for replace. Project-wide search and replace with preview. In visual mode, pre-fills the selection.

NXSearch

Navigation

<C-h>

Go to Left Window

Ctrl + h/j/k/l mirrors vim motion keys for window navigation.

NNavigation
H

Prev Buffer

H (left) for previous buffer. Think of buffers as a horizontal list.

NNavigation
L

Next Buffer

L (right) for next buffer. Pairs with H for quick buffer switching.

NNavigation
s

Flash Jump

s starts Flash jump. Type a few chars and pick a label to teleport.

NVONavigation

Editing

gcc

Toggle Line Comment

gc is the comment operator. gcc applies it to the current line.

NEditing
gc

Toggle Comment

gc in visual mode comments/uncomments the selected lines.

VEditing
<C-s>

Save File

Ctrl + s saves, familiar from other editors. Works in all modes.

NIVXEditing

Git

<leader>gg

LazyGit

LazyGit is a full TUI Git client that opens in a floating window.

NGit

UI

<leader>e

Explorer (Root Dir)

Just e for explorer. Opens the file tree at project root.

NUI