You are not logged in.

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

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

[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: 414

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: 99

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
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,279

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

Board footer

Powered by FluxBB