I have the following setup:
mkdir /1
mkdir /1/2
mkdir /1/2/3
ln -s /1/2/3 /1/3
If I do cd /1/3
, and then pwd
, I g
It appears you can't, other than via system('pwd -L')
. According to the vim_use mailing list Vim automatically resolves symlinks nowadays.
See the text around :h E773
for rationale; if Vim went by symlinks instead of resolved filename, it'd be possible to have the same file open in two buffers under two different names, and Vim would become confused trying to figure out where the swap file should be. See also in :h version7.txt
:
Unix: When editing a file through a symlink the swap file would use the name of the symlink. Now use the name of the actual file, so that editing the same file twice is detected.