Use BufWritePost instead of VimLeave and full path rather than '%'.