I'm lazy. If I can shave a little time off mundane tasks, I'll try. One such task that's bothered me of late is opening a Maven project in Intelli-J.
This seems wasteful:

  1. Open Intelli-J
  2. File | Open Project
  3. Shuffle around looking for the correct directory
  4. Click OK

I just want to type idea pom.xml in Terminal and have my IDE ready and waiting.

For example with TextMate, if I want to view the current project, I'll type mate . in Terminal and all is good. So why not just apply the same to Intelli-J?

How does the mate command work? Well, it's essentially just an alias for open -a TextMate.app

So the simple answer is... open -a IntelliJ IDEA 10.5.4.app pom.xml

Hmmmm. That's a big command for a simple developer to remember. Which version of Intelli-J was I on again?

To sharpen this up, add an alias to ~/.profile


alias idea="open -a IntelliJ IDEA 10.5.4.app"

Now we can just use:


idea pom.xml

If the project has already been imported into Intelli-J, you get this dialog:

I can cope with that. It's already feeling a lot better.