Hi,
after noticing Vim writes to my flash drive constantly, I made some changes to my vimrc. I edited the global vimrc located in /etc/vim/ on Debian.
It's something I threw together while searching the net. Last part of vimrc:
Code:
[...]
" <-- My settings --
set tabstop=4
let user_swap_dir='/tmp/' . $USER
silent execute '!umask 002; mkdir ' . user_swap_dir
set directory=user_swap_dir//
silent execute '!umask 002; mkdir ~/.local'
silent execute '!umask 002; mkdir ~/.local/vim_backups'
set backupdir=~/.local/vim_backups//
set nowrap
set scrolloff=4
set title
set visualbell
" -- End of my settings -->
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
Now Vim is unable to create a swapfile, though the directories seem to be created. Sometimes this makes Vim bug out on me.
I'd like to have files to recover from in case of power failure. IIUC I actually need the swap file for that; and not the backup file like my settings assume at the moment.
Could somebody please help me understand what is going wrong, or just give me a solution on a silver platter?