I've been playing a lot more with Coda 2 upon purchasing it since its initial release a couple of weeks ago. While I had been teetering on purchasing version 1 last year, I held off on anticipation of the version 2 release. In the meantime I played with Sublime Text 2.\n\n\n\nWhile I'm certainly no coding ninja I did find Sublime Text 2 a little difficult to undertake all my grasshopper coding stuff. In most cases I found 4 pieces of software open for my workflow:\n\n\n\nThe Sublime Text editor itself (where all the coding action happened)Terminal (where I would interface with the server)Panic's Transmit (if needed when uploading images, etc.)The browser (to check everything was working)\n\n\n\nDuring this time I wore out my \u2318-Tab keys a lot!\n\n\n\nThankfully, when Coda 2 was released I jumped at the opportunity and bought straight away. All the things I have open in my Sublime Text 2 workflow were now all rolled into one nice neat piece of software.\n\n\n\nHowever, upon using it more I did begin to ask myself the question: How can I open files from the command-line in Terminal and have them opened in Coda 2's text editor?\n\n\n\nFor example, if I run the command:\n\n\n\n$ coda test.js\n\n\n\nI want text.js now opened as a tab in the text editor, and if text.js hasn't been created or doesn't exist in the current working folder then create it.\n\n\n\nAfter scouring the internet for a while I stumbled upon Noah Frederick's shell script code and slightly modified it to allow what I wanted in my Terminal. Here's what I did to get it to work:\n\n\n\nOpen up Terminal and navigate to your home directory (generally cd ~ or wherever your .bash_profile file is)\n\n\n\n$ cd ~\n\n\n\nEdit your .bash_profile file by copying and pasting the code found below - I usually do quick edits in Terminal by using:\n\n\n\n$ nano .bash_profile\n\n\n\n\n\n\n\nSave your .bash_profileRestart your .bash_profile with the command:\n\n\n\n$ source .bash_profile\n\n\n\nTest your code by opening a file and then creating a file - hopefully it all works!