You can do this with the keystroke, or you can control-click or right-click the file and select 'Get Info' from the popup menu. Next, you want to do the 'Get Info' thing on the file.Don't open it, just click it once to select it. Using the Finder, or just your desktop, select any '*.java' file.In my case I'm going to be working with files ending with the '.java' extension, so for your own purposes just use the extension of the filenames that you need to work on (like '*.txt' files, or any other filename extension), and you should be able to follow these steps. I want to be able to double-click them and have them be opened with TextMate. Right now I'm working on some Java code, but I don't want my '*.java' files to be opened by XCode, which is the current default program. Let me do this by walking through an example.
In this short tutorial I'll show you how to configure your Mac to open files with the programs you want them to be opened with. I think the properly-phrased question that led me to this answer is: How do I configure my Mac OS X to automatically open a file (with a given filename extension) with a default application of my choosing? Okay, I think I finally have some of the Mac default application file-open stuff figured out.