Show Menu
Cheatography

LazyVim (neovim) Cheat Sheet by

Comprehensive Guide to Editing and Code Navigation

Core Navigation

<C-­f>
Forward (Page down)
<C-­d>
Move down (Half a page)
<C-­b>
Backward (Page up)
<C-­u>
Move up (Half a page)
<C-­o>
Jump back
<C-­i>
Jump forward
gg
Go to first line
Shift-G
Go to last line
:10, 10gg
Jump to line# 10
10j
(Relative) Jump down 10 lines
10k
(Relative) Jump up 10 lines
J
Join lines

UI/UX

<le­ade­r>uC
Colors­cheme with preview
<le­ade­r>uD
Enable code block dimming
<le­ade­r>ul
Toggle line number
<le­ade­r>uL
Toggle relative number
<le­ade­r>uw
Toggle word wrap
<C-­/>
Toggle Terminal window
:Neotree
Neotree file explorer

Buffer Management

<le­ade­r>fb
List open buffers
<Sh­ift­>l/h
Next/Prev buffer
]b or [b
Next/Prev buffer
<le­ade­r>bd
Close current buffer
<C-­w>v
Split vertical
<C-­w>s
Split horizontal
<C-­w>h­/j/k/l
Navigate splits

Text Objects

viw
Select inner word
vi"
Select inner quotes
vi{
Select inner curly braces
vip
Select inner paragraph
va[
Select around [] braces
dap
Delete around paragraph
 

Code Folding

zR or zi
Open all folds
zM
Close all folds
za
Toggle fold
zA
Toggle all folds under cursor
zc
Close fold
zo
Open fold
zO
Open all folds under cursor

Marks & Bookmarks

<le­ade­r>sm
View all marks
m[a-z]
Set local mark
'[a-z]
Jump to mark
' '
Jump to last position
`[a-z]
Jump to exact position
:delmarks a-z
Del lowercase marks (a-z)
:delmarks ax
Del "­a" and "­x" marks
:delmarks!
Del marks (except A-Z,0-9)

Functions & Symbols (LSP)

:LspInfo
Show attached LSP info
<le­ade­r>cs
Document symbols
gr
Find all references
gd
Go to definition
gD
Go to declar­ation
gy
Goto Type definition
K
Show doscst­rin­g/type hints
[[ or ]]
Prev/Next reference

Diagno­stics

]d
Next diagnostic
[d
Prev diagnostic
<le­ade­r>sd
Document diagno­stics
<le­ade­r>sD
Workspace diagno­stics

Code Actions

<le­ade­r>cr
Rename symbols
<le­ade­r>cf
Format code
<le­ade­r>ca
Code actions

Indent­ation

>
Indent right
<
Indent left
=
Auto-i­ndent as per language
=ip
Indent current paragraph
gg=G
Auto-i­ndent entire file
 

Search

<le­ade­r>sr
Search and Replace
<le­ade­r>fc
Find Config files
<le­ade­r>ff
Find files (Root dir)
<le­ade­r>/
Grep (Root dir)
<le­ade­r>sG
Grep (CWD)
<le­ade­r>ss
Symbol search
<le­ade­r>sc
Command history
<le­ade­r>sw
Search word under cursor
<le­ade­r>sk
Search all keymaps
<le­ade­r>st
Search TODO|W­ARNING

Git (fzf-lua)

<le­ade­r>gc
Commit log texts search
<le­ade­r>gs
Status (file search)
<le­ade­r>ge
Git explorer (Neotree)
<le­ade­r>gf
Current file history

LazyGit

<le­ade­r>gg
Open LazyGit window
<C-­r>
Switch to recent repo
<C-­b>
Filter files by status
p
Git pull
P
Git push
<sp­ace>
Stage
a
Stage all
c
Commit
s
Stash
z
Undo
<C-­z>
Redo
i
Add to .gitignore
q
Quit
                   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Regular Expressions Cheat Sheet
          Python Cheat Sheet
          nvim cheat sheets Cheat Sheet