How to use Symbolic Linking to Reference Files/Folders (Trust me, it’s Useful!)

chain link

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
sudo ln -Ffhinsv /opt/local/bin/vim /usr/bin/vim
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.

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!

Similar Posts:

I Like This Tip!


Post a comment to "How to use Symbolic Linking to Reference Files/Folders (Trust me, it’s Useful!)"



MacTips Newsletter


Twitter MacTips

  • Stay up to date with the latest Mac tips, tricks and news by following us on twitter: MacintoshTips.

AppleGazette Headlines

Most Popular Tips (30 Days)

Most Commented (30 Days)

Good Tips

Recent Discussions

MacTips Poll

What level of tips would you like to see?

View Results

Loading ... Loading ...

Friends of MacTips

Subscribe to MacTips

Site Links