On 3/9/2026 7:48 AM, Christian Brabandt wrote:
Please keep the reply on the vim-use list, forwarding to vim-use for
reference.

On Mo, 09 Mär 2026, CrestChristopher wrote:

Vim returns no error;

     set backupdir="$HOME/.backup" I've also tried

     set backupdir="/etc/.backup
This basically is the same as

:set backupdir=

e.g. because of the double quote acting as a comment character, you are
effectively emptying the option value.

You probably want:

:set backupdir=~/.backup//

note the trailing double slashes to ensure that backup files are written
with full path names, where slashes are replaced by % signs, as
documented at :h 'backupdir'. Please also note: I am not hundert percent
sure if Vim expands the "~" automatically, but I believe it does. If
not, you may want to explicitly spell out your home directory like this:

:set backupdir=/home/user/.backup//

Finally please note, you can always check the value by querying the
option setting directly:

:set backupdir?

     set writebackup
This will create a backup, but will delete the backup file after a
successful write. Is that what you want? Or do you want to keep the
backups in which case you want

:set backup

Thanks,
Christian

Although I typed out the full home path where the .backup directory is located query the path returned; backupdir=~/.backup//

In this case, after typing something in vim, and quitting without saving; there was no backup saved in the backupdir path ?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/1b007685-c62a-4579-bad1-b6d328991bcb%40gmail.com.

Reply via email to