Show Menu
Cheatography

NeoVIM Keyboard Shortcuts (DRAFT) by

NeoVIM cheat sheet here

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

Learning

,
leader
,p (_dP)
Paste, keep in buffer
,s
Quick Save
:%s/ol­d/new/g
Find and replace (gc for confir­mation)

Treesitter

Alt-t
Open/close
,f
Refresh
,n
Search File

Panes

,tk
V -> H
,th
H -> V

Window

:split
Split window horizo­ntally
:vsplit
Split window vertically
:vnew
New, empty file, vertical split
CTRL-W left/r­igh­t/u­p/down
Move to the left/r­igh­t/u­p/down
:qall
Close all windows
:wall
Write all windows (with changes)
 

Tabs (tabpage)

:tabnew
Open file in new tab
gt, C-PageUp
Next Tab
gP, C-PGDown
Previous Tab

Editing

gcc
Comment line
gbc
Comment block
gco/O/A
Comment above/­bel­ow/end of line
>>
Increase indent
<<
Decrease indent
]p
Paste and keep aligned
>%
Indent Block
<%
C-T
Increase tab
C-d
Decrease tab
 

NeoVIM config­uration

,r (:so %<C­R>)
Reload config

Scrolling

CTRL-E
Scroll window Down
CTRL-Y
Scroll window Up
zz
Center line in window