This task will teach you how to quickly and easily open files within a project without reaching for the mouse.
You may navigate to files within your project in two main ways:
The Project Drawer menu: This is the most obvious way to select a file to open. Once clicked, the file will open a new tab in the document window.
The Go to File... option: From the menu, select Navigation | Go To File… (Command + T).
The Project Drawer menu should be self-explanatory as it's simply a list of the files and folders in a project.
If you already know the name of the file you want to open, the Go To File... (Command + T) option saves a great amount of time. When you use this option, a pop-up box will appear with a list of the files in the project, as shown in the following screenshot:
Start typing to filter the files by what you enter in the search box. Press Tab and then the up or down arrow to navigate your selection to the file you wish to open. Press Enter or Return to open the file in the document window and close the Go to File... pop-up box.
You can toggle the Project Drawer at any time as well as specify which file extensions you want to open in TextMate.
From the menu, select View | Show/Hide Project Drawer (Command + Option + Control + D).
The Project Drawer will attempt to open on the left-hand side by default. However, if there's no room, it will open on the right side. TextMate will remember which side it last opened on. So, in a scenario where Project Drawer opened on the right-hand side, was hidden, and then reopened with enough room on both sides, it will open on the right-hand side again.
When you open projects, unless you exclude certain files, TextMate will also pull in any images or executables. Though you may not mean to, you can open these files in the document window.
If you'd rather not have TextMate read these files when you click on them (usually by accident), then you can right-click on the files in the Project Drawer and select Treat Files with ".xxx" Extension as Binary. An example of this is shown in the following screenshot:
You can undo this by right-clicking on the file and selecting Treat Files with ".xxx" Extension as Text.