1

I have a weird problem in Textmate 2 that I didn't experience before. I usually open TM2 on the command line by cd'ing into the project folder, then enter mate ..

Strangely, for one project, the "Project folder" now is not the one I do mate . in, but it's my home folder. This means that pressing Cmd-T searches my whole home folder now, not only my project folder. This is very embarassing, and I can't seem to change it. I quit TM2, etc., but this didn't help. Interestingly, on other folders, it's still the "old", expected behavior.

Any idea on how to change this?

Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152

2 Answers2

4

Find the folder you want to set as your Project Folder in the file browsing drawer View->Show File Browser. Use the menu button, it looks like a down arrow, select Use "[folder name]" as Project Folder.

screenshot of menu, with highlighted "Use __ as Project Folder"

Graham P Heath
  • 7,009
  • 3
  • 31
  • 45
  • 1
    Thanks a lot. Strangely, this was already set as project folder. I clicked it again to make sure everything really works, and now Cmd-T only shows the wanted files. Thank you! – Joshua Muheim Mar 03 '14 at 20:23
  • 1
    It's still strange: when restarting TM2, the behavior goes back to selecting my home folder as project folder, but **only for this folder**. In other projects it's still as expected. At least I know how to temporarily set it correct for the session now. – Joshua Muheim Mar 03 '14 at 20:25
  • 1
    Damn it, it's worse: whenever I open a new file, it goes back to the described behavior - I always have to set the project folder again and again. Very annoying. Is there some hidden per-folder TM2-folder or something with settings I can delete? – Joshua Muheim Mar 03 '14 at 20:28
  • 1
    Have you tried resetting your preferences: http://stackoverflow.com/questions/16429165/completely-uninstall-restore-textmate-2 Are you on the latest version (2014-02-23 / v2.0-alpha.9515)? There were some changes made to Project Folder in this release that might help you out. – Graham P Heath Mar 03 '14 at 21:26
  • 2
    Creating a `.tm_properties` file with `projectDirectory = "$CWD"` in it helped. Don't know why this is needed now..? I edited your answer and added this information. – Joshua Muheim Mar 03 '14 at 21:47
  • I'm hesitant to add that to the answer as none of my .tm_properies files contain projectDirectory at all, implying your version is still not working correctly. – Graham P Heath Mar 03 '14 at 22:00
  • That's okay. I add a small answer myself, but leave yours as the correct one. – Joshua Muheim Mar 04 '14 at 06:39
  • @Tim There definitely is. I've even got a screenshot above of it. Maybe you've got your 'File Browser' hidden? View -> Show File Browser – Graham P Heath Jan 31 '19 at 15:01
  • not seeing it here under TextMate 2.0-rc.22 [screengrab](https://www.dropbox.com/s/yxuyt2m67lefzoy/Screenshot%202019-01-31%2021.19.07.png) – tim Jan 31 '19 at 21:27
  • 1
    @tim you gotta click the little down arrow `˅` – Graham P Heath Jan 31 '19 at 23:33
1

After adding a .tm_properties file in the project folder with the following content solved the problem for me.

projectDirectory = "$CWD"

This may not be a general fix for the problem, but at least on a per-project base it's working for me.

Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152