To remember when to use :wq and :q! without getting confused, I always say it out loud.
wq = write (to disk) and quit
q! = quit without writing (to disk)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.