Closed jcmdln closed 8 years ago
You can use os.path.abspath(os.path.expanduser(filename))
for evaluating the ~ (it will work for ~username as well as plain ~). Intelligently parsing out env vars before/after expanding ~ is going to be tougher to decide on but it's a start.
Thanks for reporting! This commit should fix it: https://github.com/jonathanslenders/pyvim/commit/fb0f6956e6b8f8620c2fd3b31bef9697d59fd21c
Installed fresh from master, confirmed working with PyPy 5.0.1. Thanks!
@jonathanslenders That was quick! Looks like that has solved the issue of using ~/
when using long paths, great suggestion @therealfakemoot!
Closing for now
When opening a file using
:e
it appears that relative paths do not resolve at all, and will open a new blank file rather than the intended target.:e ~/Projects/example/example.conf
:e $HOME/Projects/example/example.conf
Assuming that the file in this example existed, it would instead open an empty file with the same path being displayed. If I open pyvim in my user directory ($HOME) then I can traverse the paths normally, which is the workaround I've been using for the moment.
I suppose it's not too much trouble to type
/home/user/
but it would be nice if relative paths would also work.