Thursday, August 9, 2018

Re: Avoid "auto" short paths

> This is the company environment, is very common users have they own disk
> areas at the network of the company, which usually is a drive mapping and
> set at HOMEDRIVE and HOMEPATH.

So HOMEDRIVE and HOMEPATH are always set? Then these should be used,
they are checked before USERPROFILE.

> When I open the file , at %USERPROFILE% which is my local drive , vim
> internally change the path references from c:\Users\cinacio (%USERPROFILE%)
> to "~" .
> But when vim expand "~" and exists HOMEDRIVE and HOMEPATH set, they use it.
>
> I know I can force my HOME setting %HOME%=3D%USERPROFILE% at windows
> environment.
> But I have others programs at my desktop and I don't know how this can
> affect them, so I would to avoid set the %HOME%
>
> That's why I would force vim works always with absolute path.

When HOMEDRIVE and HOMEPATH are set, then USERPROFILE should not be
used. Are you saying that HOMEDRIVE and HOMEPATH are sometimes not set?
That effectively means your home directory moves around, so it's
expected that Vim doesn't handle that.

Using an absolute path has the opposite effect: If your home directory
is on a dynamically mounted drive, the drive letter can change while
it's still the same directory. Then using "~/" is actually avoiding
problems. Thus we can't use the full path as a default.

I think having to set $HOME is acceptable.


--
Arthur pulls Pin out. The MONK blesses the grenade as ...
ARTHUR: (quietly) One, two, five ...
GALAHAD: Three, sir!
ARTHUR: Three.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: