DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Dave has posted 5 posts at DZone. View Full User Profile

Open The Current Ruby On Rails Directory In TextMate Without Tmp, Log And Cache

05.07.2009
| 3879 views |
  • submit to reddit
        
ls -1 | egrep -vi "(log|tmp|cache)" | xargs mate
Instead of typing this everytime an alias would be handy. Put this
alias railsmate='ls -1 | egrep -vi "(log|tmp|cache)" | xargs mate'
in your 
~/.profile
 or wherever you put your aliases.    

Comments

Snippets Manager replied on Fri, 2009/05/08 - 5:10am

Actually you can ignore these folders in Textmate. Open Preferences -- Advanced -- Folder References. Here is my file pattern: !(/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ And folder pattern: !.*/(\.[^/]*|tmp|index|public/images|vendor/rails|vendor/.*/test|vendor/.*/tests|doc|rails_root|CVS|log|data_dump|build|_darcs|pkg |_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)? |bundle))$