Sym Links - Can Be Absolute ( / at beginning) or Relative
VIM, Symlink

Symlink targets can be either absolute (starting with /) or relative to the symlink's location. Since the symlink is located in /Users/simont/ and has ".vimrc" as its target, it is essentially pointing to itself.

Try recreating the symlink using a correct path: (note that the target is stored in the symlink exactlyas given in command line, without considering $PWD)

  • Relative:

    ln -sf repositories/config-files/.vimrc ~/.vimrc
  • Absolute:

    ln -sf ~/repositories/config-files/.vimrc ~/.vimrc 

(No, I don't know why it works when opened for editing...)

| Back