Skip to content

Why didn't my file open in a tab?

protocool edited this page Sep 14, 2010 · 1 revision

Sometimes when you click on a line in the AckMate results listing, the file opens in its own window rather than opening in a tab inside the project window.

Here’s why (most of the time):

The likely cause: the file doesn’t appear in the project drawer.

If the file being opened doesn’t appear in the project-files drawer then TextMate won’t open it in a tab. This is the first thing to check if you’re confused about why the file just opened in its own window.

Why doesn’t the file appear in the project drawer?

It may be that you have a file-pattern or a folder-pattern (either global in TextMate preferences or in the project’s info) that causes that file to be excluded from the project drawer.

Why doesn’t AckMate exclude those files then?

AckMate tries its best to do just that.

The “Use TextMate folder references” checkbox will cause AckMate to exclude directories from your search based on the global folder-pattern.

Unfortunately TextMate’s author has said that there’s no way for a plugin to access the project’s folder-pattern. There’s not much I can do if your file is being excluded from the drawer because of the project’s folder-pattern.

As for the file-pattern, I’ve found ack’s own “interesting file selection” mechanism to be excellent so I’ve never considered referencing it. If it’s a big deal for you then please file a request in the issue tracker or better yet, send me a pull request.

But the file is in the project drawer…

Oops. Sounds like a bug. Please report it in the issue tracker with instructions on how to reproduce the problem – thanks.