Skip to content

Instantly share code, notes, and snippets.

@chrisyour
Created December 4, 2010 20:05
Show Gist options
  • Save chrisyour/728445 to your computer and use it in GitHub Desktop.
Save chrisyour/728445 to your computer and use it in GitHub Desktop.
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern
!(/\.(?!\W*)[^/]*|\.(gitkeep|DS_Store|tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
# Folder Pattern
!.*/(.git|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
@DaryMerckensGT
Copy link

I kinda like having the .git folder there so I went with:

File pattern

!(/.(?!\W_)[^/]_|.(git/index|DS_Store|tmproj|o|pyc)|/Icon\r|/svn-commit(.[2-9])?.tmp)$

Folder pattern

!._/(.git/objects|CVS|_darcs|MTN|{arch}|blib|.~.nib|.*.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$

@atErik
Copy link

atErik commented Aug 18, 2020

in TextMate v2.0.6 , i see these:

default "Exclude files matching" : {*.{o,pyc},Icon\r,CVS,_darcs,_MTN,\{arch\},blib,*\~.nib}
default "Include files matching" : {*,.tm_properties,.htaccess}
Non-text files : {*.{ai,bz2,flv,gif,gz,icns,ico,jpg,jpeg,m4v,nib,o,pdf,png,psd,pyc,rtf,scssc,swf,tar,tbz,tgz,tif,tiff,zip},Icon\r}

What to change to show all hidden files+folders (in MacOS) in file-browser pane of TextMate ?

goto TextMate > Preferences > Projects , and change the "Include..." box regex to this:
{*,\.*}

What to change to show hidden files+folders except .git in your TextMate project drawer ?

change the "Include..." box regex to this (to show all hidden files+folders):
{*,\.*}
and to exclude the .git, add that in-end of "Exclude..." box, like below:
{*.{o,pyc},Icon\r,CVS,_darcs,_MTN,\{arch\},blib,*\~.nib,\.git}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment