How to quit from vi editor in unix programming?

Answer:
There are several ways to quit from vi/vim. One way is:

press the escape key
type :wq

or

type the escape key
type ZZ
First answer by Enigmamerlin. Last edit by Enigmamerlin. Contributor trust: 107 [recommend contributor recommended]. Question popularity: 2 [recommend question].