Skip to content

Instantly share code, notes, and snippets.

@bojoer
Forked from chrisyour/Folder Preferences
Last active December 31, 2017 01:06
Show Gist options
  • Save bojoer/8869995 to your computer and use it in GitHub Desktop.
Save bojoer/8869995 to your computer and use it in GitHub Desktop.
Folder Preferences
# 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))$
As of version 2.x there is no Advanced button anymore and the way how Textmate maneged including and excluding files and/or folders has changed. It is now in two simple text input fields, the first one for files and directories to Include and the second for the ones to Exclude.
Original settings are
Exlude files matching: {*.{o,pyc},Icon\r,CVS,_darcs,_MTN,\{arch\},blib,*~.nib}
Include files matching: {*,.tm_properties,.htaccess}
So the converted regexes to correct string value for the new methods are:
Exclude files matching: {*.{gitkeep,DS_Store,tmproj,o,pyc},Icon\r,svn-commit(\.[2-9])?\.tmp,.git,CVS,_darcs,_MTN,\{arch\},blib,*~.nib}
Include files matching: {*,.tm_properties,.htaccess,*.bash*,.*{framework,app,pbproj,pbxproj,xcode(proj)?,bundle}}
The original regexes to set directly in a project folder in .tm_properties were:
For files: !(/\.(?!\W*)[^/]*|\.(gitkeep|DS_Store|tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
For folders: !.*/(.git|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
Extra information from StackOverflow:
Click Preferences > Advanced > Folder References,
Edit File Pattern (minimal change to original default):
!(/\.(?!\W*)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
as well as Folder pattern (minimal change to original default):
!.*/(\.(?!\W*)[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
This only applies to new project folders. For an existing one, you need to edit the pattern after right-clicking on folder reference and choose Show Information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment