Show Menu
Cheatography

My NVim Config Keyboard Shortcuts (DRAFT) by

My personalized neovim keymaps

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Move Horizo­ntally

Normal Mode
h/l
Left Right
f/F/t/T
Move to a char
\
Repeat Forward
,
Repeat Backward
w/W/e/E
Move to start/end Word
b/B
Move back to start of word
0/$
Start/End of Line
^/Back­space
Start character of Line
<S-­Lef­t/R­igh­t>
Left/Right while selecting
Insert Mode
<C-­f>
Move start of indent
zH
Scroll to leftest char

Move Vertically

Normal Mode
j / k
Down/Up
<C-­d>/­<C-­f>
Down/Up 10 lines
} / {
Next/Prev Paragraph
gg / G
Top/Bottom of file
<S-­Up/­Dow­n>
Up/Down while selecting
gj / gk
Down/Up display line
zz
Center Current Line
<C-­e> / <C-­y>
Scroll Up/Down
zt / zb
Scroll Line to Top/Bottom

Editing

Enter Insert Mode
a / i
Append / Insert
gi
Insert at the end of last insert
A / I
Line version a/i
o / O
Below/­Above New Line
c / C / d / D
Change­/Delete Moveme­nt/Line
Editing
J
Join line below to current
<le­ade­r>*­({"'<
Surround the visual selection
.
Repeat last edit
x
Delete a character
u / <C-­r>
Undo/Redo
p / P
Paste After/­Before
gp / gP
Paste and move to end
In The Insert Mode
<C-­hjk­l>
Move Like Arrows
<C-­f>
Move To Current Indent
<C-­w>
Delete prev word
<C-­o>
Temporary normal mode
<C-­r><­reg­ist­er>
Paste Register
<C-­r>=
Evaluate expression then paste

Jumping

%
Matching Parens
<C-­o> / <C-­i>
Prev/Next Jump
/ ?
Search to Jump
<le­ade­r>s
Leap
:number
Jump to line
'<m­ark>
Jump to mark (start of line)
`<m­ark>
Jump to mark

Code Completion and Templates

<C-­Spa­ce>
Cmp Menu Toggle (insert mode)
<C-­e>
Expand Snippet (insert mode)
<C-­n> / <C-­p> / Down / Up
Next/Prev Cmp item
<C-­y> / Enter
Accept
 

Find And Replace

/
Search
?
Search Backward
n/N
Next/Prev Occurance
<le­ade­r><­spa­ce>
Toggle Highli­ghting
<le­ade­r>r
Search word under cursor
<le­ade­r>R
Replace word under cursor
:vim Pattern Files
Search In Files. Supports patterns
:grep String Files
Search using grep (rg)
:Rg String [Files]
Use Rg extension to search
<le­ade­r>pg
Telescope Grep
:GrugFar
Vscode Like Search
r<c­har>
Replace character
<C-­a>
Increment Number
<C-­x>
Decrement Number
Find And Replace In Project
:Rg search
:cdo s/prev­/ne­xt/gc

Text Objects

w
Word
[ { ' " ( <
s
Sentence
p
Paragraph
<C-­Spa­ce>
Expand Selection (with lsp objects)
<C-­s>
Shrink Selection
t
HTML Tag
f
Function
b
Block
c
Class
a
Argument

Lsp Actions

K
Trigger Hower
gd
Go definition
gcd
Go declar­ation
gI
Go implem­ent­ation
go
Go type definition
gs
Signature Help
<F2>
Lsp Rename
gca
Code Actions
gl
Open error float
gR
Glance References
]d / [d
Next/Prev Error
]D / [D
Next/Prev Diagnostic
gS / <C-­s>
Signature Help n/i mode (exten­sion)

Marks

[a-z]
Local marks
[A-Z]
Global marks
.
Last Change
'
Last Jump
[ / ]
Start/End last pasted text
< / >
Start/End last visual selection
[0-9]
Jumplist Locations
Actions
'<m­ark>
Jump to mark (start of line)
`<m­ark>
Jump to mark

Registers

System Registers
"
Last Delete­/Ch­ang­e/Yank
0
Last Yank
* / +
System Clipboard
:
Last executed command
.
Last inserted text
%
Current file ame
/
Last search pattern
_
Black hole
Register Actions
<C-­r><­reg­ist­er>
Insert register (insert mode)
:let @a = "­som­eth­ing­"
Put something into a register
:let @a = @+
Put the clipboard content into a
<C-­r>=
Put expression result
 

Tabs

<le­ade­r>tn
New Tab
<le­ade­r>ta
New Tab
<le­ade­r>tc
Close Tab
<le­ade­r>t­m<l­eft>
Move Tab Left
<le­ade­r>t­m<r­igh­t>
Move Tab Right
<le­ade­r>t­<le­ft>
Go Left Tab
<le­ade­r>t­<ri­ght>
Go right Tab
<le­ade­r>tt
New Terminal Tab
:TabRename name
Rename tab

Buffers

<le­ade­r>ba
Vertical Split
<le­ade­r>bA
Horizontal Split
<le­ade­r>bp
Telescope Buffers
<le­ade­r>bn
New Empty Buffer
<le­ade­r>bc
Close Buffer
<le­ade­r>b­<ar­row>
Move Panel

Browse and Telescope

;
Files
<le­ade­r>pg
Grep
<le­ade­r>pr
Resume
<le­ade­r>pb
Buffers
<le­ade­r>pd
Diagno­stics
<le­ade­r>pc
Git status
<le­ade­r>pm
Marks
<le­ade­r>pq
Quickfix
<le­ade­r>ps
Workspace Symbols
<le­ade­r>p?
Keymaps
<le­ade­r>ph
Highlights
<le­ade­r>u
Undo Tree
<le­ade­r>pe
Yazi
<le­ade­r>pE
Resume Yazi
-
Oil

Quick Fix List

<le­ade­r>co
Open QFList
<le­ade­r>cc
Close QFList
]q / [q
Next/Prev Item
<le­ade­r>cn / cp
Next/Prev Item
<le­ade­r>a
Add to QFList
dd on QFList
Remove Item
:w name.qf
Write QFList to file
:cfile name.qf
Load to the QFList
:cdo command
Do command on QFList
:make, :vim, :Rg
Populate QFList

Code Actions

<le­ade­r>vb
pnpm run build
<le­ade­r>vi
pnpm install

Git

<le­ade­r>hw
Neogit
<le­ade­r>hc
Diffview close
<le­ade­r>hv
Diffview File History
] / [
Next/Prev Hunk

Save

s
Save
<le­ade­r>S
SaveAll and exit
:SaveAll
Save all that can be saved
:Delet­eBa­ckg­rou­ndB­uffers
nvims
Start neovim from save

Misc

<le­ade­r>td
Todo Menu
<le­ade­r>f
Format File
<le­ade­r>u
Undo Tree Toggle
<le­ade­r>hd
Toggle Diagno­stics
<le­ade­r>hf
Toggle Formatting
:Color­ize­rAt­tac­hTo­Buffer
:make
gf
Open file (in neovim)
gx
Open file (in system)