Re: Backup Directory

CrestChristopher <[email protected]> Mon, 9 Mar 2026 07:59:22 -0400
Newsgroups gmane.editors.vim
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------rncFm89sKj7bW8tHE6X8ZBK0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable


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=C3=A4r 2026, CrestChristopher wrote:
>
>> Vim returns no error;
>>
>>      set backupdir=3D"$HOME/.backup" I've also tried
>>
>>      set backupdir=3D"/etc/.backup
> This basically is the same as
>
> :set backupdir=3D
>
> e.g. because of the double quote acting as a comment character, you are
> effectively emptying the option value.
>
> You probably want:
>
> :set backupdir=3D~/.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=3D/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=20
located query the path returned; backupdir=3D~/.backup//

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

--=20
--=20
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

---=20
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 e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_use/1b0=
07685-c62a-4579-bad1-b6d328991bcb%40gmail.com.

--------------rncFm89sKj7bW8tHE6X8ZBK0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8=
">
  </head>
  <body>
    <p><br>
    </p>
    <div class=3D"moz-cite-prefix">On 3/9/2026 7:48 AM, Christian Brabandt
      wrote:<br>
    </div>
    <blockquote type=3D"cite" cite=3D"mid:[email protected]">
      <pre wrap=3D"" class=3D"moz-quote-pre">Please keep the reply on the v=
im-use list, forwarding to vim-use for=20
reference.

On Mo, 09 M=C3=A4r 2026, CrestChristopher wrote:

</pre>
      <blockquote type=3D"cite">
        <pre wrap=3D"" class=3D"moz-quote-pre">Vim returns no error;

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

    set backupdir=3D"/etc/.backup
</pre>
      </blockquote>
      <pre wrap=3D"" class=3D"moz-quote-pre">
This basically is the same as

:set backupdir=3D=20

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

You probably want:

:set backupdir=3D~/.backup//

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

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

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

:set backupdir?

</pre>
      <blockquote type=3D"cite">
        <pre wrap=3D"" class=3D"moz-quote-pre">    set writebackup
</pre>
      </blockquote>
      <pre wrap=3D"" class=3D"moz-quote-pre">
This will create a backup, but will delete the backup file after a=20
successful write. Is that what you want? Or do you want to keep the=20
backups in which case you want

:set backup

Thanks,
Christian</pre>
    </blockquote>
    <p><span style=3D"white-space: pre-wrap">
</span></p>
    <p><span style=3D"white-space: pre-wrap">Although I typed out the full =
home path where the .backup directory is located query the path returned; b=
ackupdir=3D~/.backup//</span></p>
    <p><span style=3D"white-space: pre-wrap">In this case, after typing som=
ething in vim, and quitting without saving; there was no backup saved in th=
e backupdir path ?</span></p>
    <p><span style=3D"white-space: pre-wrap">
</span></p>
    <p><span style=3D"white-space: pre-wrap">
</span></p>
  </body>
</html>

<p></p>

-- <br />
-- <br />
You received this message from the &quot;vim_use&quot; maillist.<br />
Do not top-post! Type your reply below the text you are replying to.<br />
For more information, visit <a href=3D"http://www.vim.org/maillist.php">htt=
p://www.vim.org/maillist.php</a><br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;vim_use&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">vim_use+uns=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
vim_use/1b007685-c62a-4579-bad1-b6d328991bcb%40gmail.com?utm_medium=3Demail=
&utm_source=3Dfooter">https://groups.google.com/d/msgid/vim_use/1b007685-c6=
2a-4579-bad1-b6d328991bcb%40gmail.com</a>.<br />

--------------rncFm89sKj7bW8tHE6X8ZBK0--