Bug? :edit ~ doesn't browse the home directory

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug? :edit ~ doesn't browse the home directory

A.J.Mechelynck
Hello -- I don't know if this is for Bram or for Dr. Chip.

When I want to browse the "Home" directory, it is necessary to do ":e
$HOME": if, instead, I use ":e ~" an empty buffer named "~" will be created.
Similarly for ":new ~" etc.

This may be related to the fact that ":echo isdirectory('~')" gives the
answer 0.

Using gvim 7.00aa.0108 (Big version, see ":version" listing at
http://users.skynet.be/antoine.mechelynck/vim/v7gvim.txt ) on W32 (XP
5.1.2600 SP2).


Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Bug? :edit ~ doesn't browse the home directory

Bram Moolenaar

Tony Mechelynck wrote:

> Hello -- I don't know if this is for Bram or for Dr. Chip.
>
> When I want to browse the "Home" directory, it is necessary to do ":e
> $HOME": if, instead, I use ":e ~" an empty buffer named "~" will be created.
> Similarly for ":new ~" etc.
>
> This may be related to the fact that ":echo isdirectory('~')" gives the
> answer 0.
>
> Using gvim 7.00aa.0108 (Big version, see ":version" listing at
> http://users.skynet.be/antoine.mechelynck/vim/v7gvim.txt ) on W32 (XP
> 5.1.2600 SP2).

You need to use ":e ~/".  If you only use ":e ~" then Vim will indeed
try to edit the file "~", since that is a valid filename on Unix.

--
    [clop clop]
MORTICIAN:  Who's that then?
CUSTOMER:   I don't know.
MORTICIAN:  Must be a king.
CUSTOMER:   Why?
MORTICIAN:  He hasn't got shit all over him.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///
Reply | Threaded
Open this post in threaded view
|

Re: Bug? :edit ~ doesn't browse the home directory

A.J.Mechelynck
----- Original Message -----
From: "Bram Moolenaar" <[hidden email]>
To: "Tony Mechelynck" <[hidden email]>
Cc: <[hidden email]>
Sent: Saturday, July 16, 2005 12:44 PM
Subject: Re: Bug? :edit ~ doesn't browse the home directory
[...]
> You need to use ":e ~/".  If you only use ":e ~" then Vim will indeed
> try to edit the file "~", since that is a valid filename on Unix.

Ah, thanks.

Best regards,
Tony.