press ESC to go into command mode then exit without saving :q exit without saving if you made changes :q! for saving and quitting :wq hope that helps