Hit escape to enter normal mode, :q to quit if you don’t have any pending changes, :wq to save and quit (or Shift ZZ), :q! if you don’t care about your changes (save without exiting)
If you’re interested in learning Vim, I’d recommend running vimtutor, which should be present on most systems. But of course, the best way to learn it is to simply use it as much as you can!
Sometimes the only way out is through :)
Hit escape to enter normal mode,
:q
to quit if you don’t have any pending changes,:wq
to save and quit (or Shift ZZ),:q!
if you don’t care about your changes (save without exiting)If you’re interested in learning Vim, I’d recommend running
vimtutor
, which should be present on most systems. But of course, the best way to learn it is to simply use it as much as you can!