Cheatography
https://cheatography.com
Neovim commands, motions and tips
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Motion
Command |
Description |
h |
Left |
j |
Down |
k |
Up |
l |
Right |
o |
Insert cursor below |
O |
Insert cursor above |
i |
Insert cursor left |
I |
Insert cursor start line |
a |
Insert cursor right |
A |
Insert cursor end line |
^ |
Start of line |
$ |
End of line |
G |
Move to end of file |
gg |
Move to start of file |
nºG |
Move to line number nº |
|
|
Commands
Command |
Description |
:Ex |
Open tree files |
% |
Create a new file |
d |
Create a new directory |
:e [filename] |
Create a new file |
:w |
Save file |
:q |
Quit |
:q! |
Force quit |
:wa |
Save all buffers |
:tabe |
Create a new Tab |
/[word] |
Search in file |
:%s/old/new/g |
replace word in file globally |
:move +nº |
Move the line nº below |
:move -nº |
Move the line nº above |
Delete
Command |
Description |
dd |
Delete line |
daw |
Delete a word |
dip |
Delete a word |
dip |
Delete all lines up to the next blank line (paragraph) |
dap |
Same as dip, but also deletes the blank line |
ddp |
reverse the lines |
Copy
Command |
Description |
yy |
Copy the line |
yyp |
Duplicate the line |
yw |
Copy the word |
nºyy |
Copy nº lines below |
|