How do you configure swap file location in Vim?
set directory=~/.vim/swap//
Set directory to control where swap files are stored.
set directory=~/.vim/swap//
Set directory to control where swap files are stored.
set backupdir=~/.vim/backup//
Set backupdir to a specific directory to avoid cluttering your project.