Shift+ZZ will save the file if it's been modified and then close Vim.
Shift+ZZ is :wq iirc (write and quit)
Shift+ZZ will save the file if it's been modified and then close Vim.