I am editing a file which lives in a directory that is a symlink to another directory, i.e.
% ls -alh ~/www/experiments total 0 drwxr-xr-x 3 ubuntu ubuntu 80 Dec 5 19:52 . drwxr-xr-x 3 ubuntu ubuntu 60 Dec 8 16:25 .. lrwxrwxrwx 1 ubuntu ubuntu 8 Dec 5 19:52 tmp -> /tmp/web
so when I am editing the file:
Because the parent folder of
tmp ) is pointing to
when I run the vimscript command
vim will echo the real file path, i.e.
how can I make vim expand the symlinked path in vimscript? i.e. the desired output would be:
I've looked in
:h filename-modifiers and there doesn't seem to be anything about symlinks. Also looked at functions like
resolve() - unfortunately I think
resolve() does the opposite of what I want, it produces the real file path.