I have set autowrite
so that :make
automatically saved the file before running the build command. But now I'm increasingly using :buffer
to switch between buffers, and have now noticed that it silently saves the file, unlike :edit
, to which autowrite
doesn't apply.
I'd like to have :make
write the file out, while still having :buffer
refuse to switch buffers if current file is unsaved (similarly to :edit
).
Is there any way to achieve this?
autowrite
and create your own:Make
command so that it saves the file and execute:make
.:h user-commands
should be helpful here