Class notes 5 18 - acavataio/ITC-136 GitHub Wiki

Vi v. Vim: Vim is a version of VI with added improvements. Vi is installed on networking gear, embedded systems and minimalist cloud images.

Demo:
Bellard VM - Runs BusyBox - checking out hello.c - tcc (tiny c compiler) gcc (gnu c compiler) can be used to make it a hello world program.
Compiled the source hello.c with TCC (tcc -o (output) (outputfile) (sourcecode)) into hello, ran hello with ./hello to see it.

in vim you have insert in vi it is represented by I
dd to delete line
shift-u to undo
colon commands like VIM work in VI

command mode review:
command mode from insert mode (esc):
i for insert mode from command mode
: before commands e.g. particular line number :34

Line:
go to end of line $
go to start of line 0

File:
go to top of file gg
go to bottom of file :$

Delete:
dd

Undo:
u

2x files:
:split
(toggle ctl-w-w or ctl-w ctl-w)

search:
:/(input)
:%s(--search)/(object to replace)/(replace with)/g(--globally)/c(--confirm)

Paste: :set paste (--paste and maintain formatting) hit insert to insert pasted comment by right clicking and hitting paste

write and exit:
:wq! write-quit-force
:wq write and quit
:w! write and force
:q! quit and force

-Look up google and amazon education accounts