add advise-commands macro
save buffer when switch windows