whatisnext

Textmate Tip: Showing hidden files in the project viewer

Tagged: Textmate, Regular Expressions,

Here’s a simple but really useful tip if you do lots of website development in Textmate. The Project Viewer, by default, hides all files that start with a ‘.’, which means that lots of config files won’t show up, making editing them tricky. If you use the git version control system, updating your .gitignore file is quite often handy to keep your repository tidy. You could always use the terminal and type:

mate .gitignore

Or, you could modify the Textmate File Pattern. Its not as tricky as it seems, in Textmate, goto Preferences -> Advanced. Then change the beginning of the File Pattern from:

(?!htaccess)

To:

(?!(htaccess|git*))

Textmate will now all files that are called ‘.htaccess’ or start with ‘.git’. This way, you can add other hidden files easily, e.g., to view a hidden file called’ ‘.site_config’, use:

(?!(htaccess|git*|site_config))

You can use any standard regular expression syntax to customize the project viewer, just remember, some file are hidden for a reason!