Neovim Cheatsheet

This is my Neovim config cheatsheet.

My config is basically the 0.12 configuration version of the MiniMax repository with LSP and formatters configured.

ShortcutAction
h / j / k / lMove left / down / up / right
w / bNext / previous word
gg / GTop / bottom of file
<C-d> / <C-u>Scroll down / up half page
<C-h/j/k/l>Navigate between windows
[b / ]bPrevious / next buffer
[d / ]dPrevious / next diagnostic
[i / ]iPrevious / next indent scope

Buffers

ShortcutAction
Space + baAlternate buffer
Space + bdDelete buffer
Space + bDForce delete buffer
Space + bsNew scratch buffer
Space + bwWipeout buffer
Space + bWForce wipeout buffer

Explore / Edit

ShortcutAction
Space + edOpen file explorer (cwd)
Space + efOpen file explorer (current file)
Space + eiEdit init.lua
Space + enShow notifications history
Space + eqToggle quickfix list
Space + eQToggle location list

Find

ShortcutAction
Space + ffFind files
Space + fgLive grep
Space + fGGrep current word
Space + fbFind buffers
Space + fhFind help tags
Space + fdWorkspace diagnostics
Space + fDBuffer diagnostics
Space + frResume last picker
Space + fRLSP references
Space + fsLSP workspace symbols
Space + fSLSP document symbols
Space + fcGit commits (all)
Space + fCGit commits (buffer)

Git

ShortcutAction
Space + gsShow info at cursor
Space + goToggle diff overlay
Space + gdDiff unstaged
Space + gDDiff buffer
Space + gcCommit
Space + gCCommit amend
Space + glGit log
Space + gLGit log (buffer)

Language / LSP

ShortcutAction
Space + laCode actions
Space + ldDiagnostic popup
Space + lfFormat file
Space + lhHover documentation
Space + liGo to implementation
Space + lrRename symbol
Space + lRReferences
Space + lsGo to definition
Space + ltGo to type definition

Map

ShortcutAction
Space + mtToggle minimap
Space + mfFocus minimap
Space + msToggle minimap side
Space + mrRefresh minimap

Sessions

ShortcutAction
Space + snNew session
Space + srRead session
Space + sdDelete session
Space + swWrite current session

Terminal

ShortcutAction
Space + ttTerminal (vertical)
Space + tTTerminal (horizontal)

Editing

ShortcutAction
i / aInsert before / after cursor
o / ONew line below / above
gccToggle comment (line)
gcToggle comment (selection)
ddDelete line
yyYank line
p / PPaste after / before
u / <C-r>Undo / redo
<M-j> / <M-k>Move line down / up
<M-h> / <M-l>Decrease / increase indent

Text Objects

ShortcutAction
ci)Change inside parenthesis
di(Delete inside padded parenthesis
yaqYank around quote
vifSelect inside function call
ciiChange inside indent scope
iF / aFInside / around function (treesitter)
iB / aBInside / around buffer

Other

ShortcutAction
Space + ozZoom toggle
Space + otTrim trailing whitespace
Space + orResize window to default width

Misc

ShortcutAction
<Esc>Clear search highlights
\hToggle search highlighting
gy / gpCopy / paste system clipboard
go / gOInsert empty line below / above
<C-s>Save and go to Normal mode
[p / ]pPaste above / below current line