You are not logged in.
As of a few days ago, I get that message every time I open a file in vim, I get that error about "unable to open swap file", and then when I try to save a file, it tells me "E510: Can't make backup file (add ! to override)", so I have to use "w!" to get past that.
I've uninstalled vim / gvim, rm -r'd the /usr/share/vim directory in between doing that, but it still happens.
My /home is btrfs. If I edit a file on /tmp, I still get that opening message about unable to open swap, but I don't get the error about "Can't make backup file" when saving.
Edit: false alarm - it turned out my $HOME/.cache filesystem was hosed, and vim has ~/.cache/vim/backup// set as the backupdir by default. (according to :se backup? backupdir? backupext?) The filesystem was unrecoverable, so I recreated it.
Last edited by pdxleif (2018-12-14 22:51:09)
Offline
Please remember to mark your thread as SOLVED.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
By default, Arch Linux's configuration will set the backup, swap, and undo directories to subdirectories of ${XDG_CACHE_HOME:-$HOME/.cache} for security reasons.
BTW why is that "filesystem" hosed? Usually the cache directory is the one XDG directory you do not share... the only other thing I can think of people doing to it is mounting it as a tmpfs, which shouldn't be getting hosed, but recreated...
Last edited by eschwartz (2018-12-09 00:59:31)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Files in $HOME/.cache seem to get corrupted (specifically, chrome files in there) when my computer locks up and I have to hard reset. I've made that a separate filesystem (that's a scratch filesystem with a bunch of tiny writes where I don't care about data durability), so it won't mess up anything else for me if it gets hosed.
Maybe I need to think of a better check / alerting mechanism for that, though - apparently that filesystem got screwed up, and I didn't notice until vim started acting funny.
I found out what was going on with vim when I was still able to use vim as root. I'm used to the .swp files being next to the files I'm editing - when I noticed they weren't there I went hunting for what directories vim was using.
Offline