I have a function in vim that is calling update and I’d like to call execute to run something in case the buffer was actually modified and written to the disk.
So I’m wondering if there’s some sort of return value from update to indicate that, or some other way to know (BufWritePost seems to trigger only when :w is called).
BufWritePost and BufWriteCmd are triggered just fine when I issued
on my gVim 7.3 (WinXP). The autocommand fired when the buffer was actually modified, and didn’t if it wasn’t modified.
Tested with
and