added: only save files if the buffer has changed, auto space on ag