How can I show dotfiles in Textmate 2?

user2693845 picture user2693845 · Oct 4, 2013 · Viewed 10.9k times · Source

I recently upgraded to Textmate 2 and now my dotfiles are not showing up in the file browser. Obviously, this is important when working with stuff like .htaccess files.

Is there a way to enable this feature?

Answer

Simon picture Simon · Nov 2, 2013

Quick solution

Move the focus to the file browser (⌥⌘⇥) and show invisibles (⌥⌘I). All invisible files will appear in the file browser. Press ⌥⌘I again to hide them.

Permanent solution

If you want to always show some dotfiles (for instance .htaccess), you can either add them in Preferences > Projects > Include files matching… or add the list of files you want to show to the include array in one of:

  • ~/Library/Application Support/TextMate/Global.tmProperties (same as using Preferences)
  • ~/.tm_properties (global)
  • .tm_properties (inside a specific directory/project)

You can add all dotfiles (.*) but I don't recommend it since it can be a lot of clutter. That said, you can also exclude files with the exclude array.