You are not logged in.

#1 2018-09-15 14:26:50

kekules_dream
Member
Registered: 2009-05-19
Posts: 102

[SOLVED] vim not saving a backup file

I'm running vim-8.1.0374-1 and everything else is up to date also.

In my ~/.vimrc I have set backup. Within vim,

:echo &backup
1

But no backup file is ever saved. Is anyone else seeing this?

Last edited by kekules_dream (2018-09-15 22:07:34)

Offline

#2 2018-09-15 19:43:17

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,096

Re: [SOLVED] vim not saving a backup file

Post your .vimrc file and a "ls -ld" for the folder you have configured as "backupdir".

Offline

#3 2018-09-15 22:07:13

kekules_dream
Member
Registered: 2009-05-19
Posts: 102

Re: [SOLVED] vim not saving a backup file

Thanks twelveeighty, using your clues I fixed it. Previously and for many years, vim would save a backup in the directory of the original file if you did not set backupdir. Now, apparently you have to set backupdir. I made one, set it, and now the backups are being saved in there. Thanks again.

Last edited by kekules_dream (2018-09-15 22:08:24)

Offline

#4 2018-09-16 01:33:05

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] vim not saving a backup file

Since CVE-2017-1000382, our vim package now sets the directories for things like swap and backup files, *iff* you don't have something set already.

That is to say, /usr/share/vim/vimfiles/archlinux.vim sets them to be stored in your $XDG_CACHE_HOME by default.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2018-09-19 01:45:06

kekules_dream
Member
Registered: 2009-05-19
Posts: 102

Re: [SOLVED] vim not saving a backup file

Thank you, too, Eschwartz! Great to know. Indeed many backups were present at $XDG_CACHE_HOME/vim/backup/

Offline

Board footer

Powered by FluxBB