add autosave when insert mode was leave