Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
TextMate How-To

You're reading from  TextMate How-To

Product type Book
Published in Oct 2012
Publisher Packt
ISBN-13 9781849693981
Pages 76 pages
Edition 1st Edition
Languages
Author (1):
Christopher J Mears Christopher J Mears
Profile icon Christopher J Mears

Traversing files (Should know)


This task will teach you how to quickly and easily open files within a project without reaching for the mouse.

Getting ready

Open or create a project with multiple files.

How to do it...

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).

How it works...

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.

There's more...

You can toggle the Project Drawer at any time as well as specify which file extensions you want to open in TextMate.

Show/Hide Project Drawer

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.

Treating files as binary

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.

arrow left Previous Chapter
You have been reading a chapter from
TextMate How-To
Published in: Oct 2012 Publisher: Packt ISBN-13: 9781849693981
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}