h, j, k, l: move cursori: enter insert modeESC: leave current modeESC + :wq: write and quitESC + :q!: quit (force)# move cursor
h j k l
# move relative
8j
# will move 8 line down
G # go to last line
gg # go to first line
5G # go to line 5
w # move to beginning of next word
b # move to previous beginning of word
e # move to end of word
W # move to beginning of next word after a whitespace
B # move to beginning of previous word before a whitespace
E # move to end of word before a whitespace
0 # move to beginning of line
$ # move to end of line
_ # move to first non-blank character of the line
g_ # move to last non-blank character of the line
a: (append) enter insert mode after cursorx: delete characterro: replace current letter by odd: delete and copy lineyy: copy (yank) a linep: paste after cursorP: paste before cursorv: select inside line (complete with h or l)V: select lines (complete with j or k)y: copy selectiond: delete selection/SEARCH: then Enter then N (previous) and n (next)# open/create file in new tab
:new filename.ext
# open/create file in new vertical split
:vert new filename.ext
# switch between splits
CTRL-w h
CTRL-w j
CTRL-w k
CTRL-w l
# copy full file
:%y+
# paste
"P+
# read and insert a file
:r file.txt
# launch shell commands
:!echo 1
# launch shell commands and capture output in the file
:r! echo 1
# will insert 1
# sort a file
1G!Gsort
You should have a clipboard util like xclip installed
"*y: copy on mouse clipboard"*p: paste on mouse clipboard"+y: copy on system clipboard"+p: paste on system clipboard"""0-9"-"a "b.."z": ". "%"#"="* and "+"_"/