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/old/new/g |
Find and replace (gc for confirmation) |
Treesitter
Alt-t |
Open/close |
,f |
Refresh |
,n |
Search File |
Window
:split |
Split window horizontally |
:vsplit |
Split window vertically |
:vnew |
New, empty file, vertical split |
CTRL-W left/right/up/down |
Move to the left/right/up/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/below/end of line |
>> |
Increase indent |
<< |
Decrease indent |
]p |
Paste and keep aligned |
>% |
Indent Block |
<% |
C-T |
Increase tab |
C-d |
Decrease tab |
|
|
NeoVIM configuration
,r (:so %<CR>) |
Reload config |
Scrolling
CTRL-E |
Scroll window Down |
CTRL-Y |
Scroll window Up |
zz |
Center line in window |
|