Since your question is about saving files, here's how I do it.
Vim files out of my way
if exists('$SUDO_USER') " no files for root user
else " I created a tmp folder
// is to avoid conflicts: it will create a file based on the path, so 2 files named the same can't conflict here.
Auto write AND read
Save when focus is lost, load when focus is gained
A complement for
au FocusGained,BufEnter * :silent! !
au FocusLost,WinLeave * :silent! w
GTK vim and Neovim handle it by default (
In regular terminal vim, a compatible terminal is needed to get focus events. I use it with
tmux and this extension.
Sorry for telling you to disable your swap files. I thought that's what I do, but I don't. And I don't think you should do it when you can set them up properly...