Vim cheat sheet

Vim cheat sheet

Vim cheat sheet. Image source http://tuxdiary.com/tag/linux-code-browsing/

ยท

1 min read

Learn vim ๐Ÿ‘จโ€๐Ÿ’ป


Open file

# Vim
vi main.go

# Neo vim
nvim main.go

Save and quiet file

:wq

Quite file

:w

Insert text/code

i / o

Append text/code

a

Select line

Shift + v

Copy

y

Copy line

yy

Delete line

dd

Select current paragraph

vap
# or
vip

Delete from the current line to the end of the file

0dG

Select multiple lines

V

Save and quite

Shift + z + z
ย