Wednesday, February 17, 2021

Re: Upgrade to recent version broke vimrc -- doesnt recognize unix style environmental variables

On Tue, Feb 16, 2021 at 8:03 AM tom <freeislandguy@gmail.com> wrote:
>
> I was working in vim and tried to sort something. The sort didn't work as I expected.
>
> I thought I would upgrade to version 8.0 in the hopes that would fix it. The upgrade gave me a new problem.

Upgrade "to" Vim 8.0? That's rather behind the times. The latest Vim
as of this writing is version 8.2.2529. It is not at all impossible
that one of the patches between version 8.0.0 and version 8.2.2529
fixes your problem.

>
> in my vimrc there was the line
>
> set backupdir=$HOME/vim/backup
>
> This no longer works and yields the dreaded "E303: Unable to open swap file"
>
> I fixed it this way
>
> set backupdir=c:\\Users\\myuser\\Documents\\home\\vim\\backup,c:\\TMP

This way, at least, there is a fallback if
C:/Users/myuser/Documents/home/vim/backup is for some reason not
writable; but anyway it is a strange (but IIUC allowable) value. I
never had problems with the default value, which puts the backup file
in the same directory as the original if possible (and usually it is),
which avoids name clashes if you happen to edit files with the same
name in different directories.

On Windows, if Vim finds the HOME environment unset at startup ($HOME
in Vim and Unix terminology, %HOME% in DOS/Windows terminology), that
variable will be set for the duration of the Vim process to the
expansion of $HOMEDRIVE$HOMEPATH if $HOMEDRIVE is defined, or of
$USERPROFILE otherwise, see ":help $HOME-windows".
>
>
>
> Regards Tom Bodine

Best regards,
Tony.

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXsEW19TEin2FMn5ZdSEqFZgLuuuNXU1o2qHKwsMztvf1A%40mail.gmail.com.

No comments: