automatically save when exiting insert mode