Thursday, August 9, 2018

Re: Avoid "auto" short paths

Cesar Martins wrote:

> I'm using vim 8.1.1 in windows 8 at my work , corporate environment.
> Here we have the %HOMEPATH%, %HOMEDRIVE% set to "H:" and "\"
>
> What happen:
>
> I open a file at my Documents, path : C:\Users\cinacio\Documents\tmp1.txt
> Vim automatically short it to : ~\Documents\tmp1.txt
> I can see that with ":ls" and "let v:oldfiles"
>
> The problem is, I use mksession and since I have HOMEPATH, HOMEDRIVE
> set , when I reopen vim and try recover my session, they don't found
> the file because they replace "~" to %HOMEDRIVE%+%HOMEPATH% , not
> %USERPROFILE% looking for the file at H:\Documents\tmp1.txt
>
> So, I want set some option to force the use of absolute path
> "c:\Users\cinacio" and not "~".
>
> Is this possible?

Why is there a difference in home directory? Vim should get it right in
both cases, when storing and when reading the session. Since you say
that the session stores "~\Documents\tmp1.txt" that looks correct, so
why is it different when you recover the session?

--
An indication you must be a manager:
You can explain to somebody the difference between "re-engineering",
"down-sizing", "right-sizing", and "firing people's asses".

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

Post a Comment