
Linking files together have a lot of different uses. Here are some examples:
In my case I use MacVim and a lot of different programming languages. However I do frequently use the regular terminal Vim. The problem is you either stick with using the outdated built-in Vim version or you have to update through source. But you have MacPorts, so why go through all that trouble when 2 commands will do it? First just install the Vim through MacPorts (
see previous post
) then to make sure that you use the newer Vim all the time just use a symbolic link. To do this do and there you go from now on any time that your computer goes to look for the Vim at /usr/bin it automatically is forwarded to the MacPorts installation.
sudo ln -Ffhinsv /opt/local/bin/vim /usr/bin/vim
Now, not only is this convenient and useful for Vim, but also programming languages. For example TextMate has a lot of bundles that make use of Ruby installed at /usr/bin/ruby, it would be tedious to manually change all them to /opt/local/bin/ruby so you use a symbolic link:
sudo ln -Ffhinsv /opt/local/bun/ruby /usr/bin/ruby
And it automatically knows to look at the MacPorts installation.
So there you go, try it out and enjoy!