>>>
, or via .py
files.nvim
to access a modal text editor.i
or insert mode, is like other editors.i
there’s “motions”, “operators”, “commands”
i
modeMotion | Movement |
---|---|
h |
left one character |
j |
down one line |
k |
up one line |
l |
right one character |
0 |
beginning of line |
$ |
end of line |
/search_term |
go to next occurance of “search_term” |
e |
end of word |
b |
beginning of word |
Operator | Action |
---|---|
i |
insert text |
r |
replace character |
d |
delete text, combined with a motion |
y |
yank text, combined with a motion |
p |
paste yanked text |
Command | Action |
---|---|
:saveas file.txt |
save text as “file.txt” |
:w |
save file |
:x |
save and exit |
:q! |
exit without saving |
Command | Action |
---|---|
ls |
list files in folder |
rm f.txt |
delete file “f.txt” |
mkdir dir |
create a new folder named “dir” |
mv f.txt dir |
move file “f.txt” to folder “dir” |
pwd |
print current folder |
cd dir |
change current folder to “dir” |
cd .. |
go to “parent” folder |
echo hi |
print the text “hi” |
echo hi >f.txt |
write “hi” to file “f.txt” |
cat f.txt |
see the text in f.txt |