mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-23 20:49:56 +00:00
5 lines
1.5 KiB
HTML
5 lines
1.5 KiB
HTML
|
I'm not much of a user of TextMate project files, generally preferring to just <code>mate .</code> in a directory. This works great until the directory or one under it contains large, irrelevant files like log files or database dumps. Its at this point you start encounter massive slow downs in the otherwise very useful 'Find in Project...' function. The slow downs turn into crashes if the files are big enough as this results in TextMate atttempting to grab vast amounts of memory. Eventually the OS tells it to, "bugger off, 1Gb is all I can give you", or something along those lines.
|
||
|
|
||
|
A <a href="http://gilesbowkett.blogspot.com/2007/06/remove-find-in-project-from-textmate.html?showComment=1182394020000#c8242128871345293431">common solution</a>, particularly when working on Rails projects is to create a shell alias that just invokes mate with the directories of interest. This works ok but given I'm working on a mix of project types (Pylons, Rails, Radiant) I wanted a solution that did the reverse: Choose everything except what I want to exclude. Informed by an <a href="http://stackoverflow.com/questions/216995/how-can-i-use-negative-wildcards-in-a-unix-linux-shell/217004#217004">answer to a question on Stack Overflow</a> I came up with this:
|
||
|
<script src="http://gist.github.com/111999.js"></script>
|
||
|
As the comments in the script note I have this in a file called '<code>ate</code>' in <code>~/Local/bin</code>, which is in my PATH. I can now happily go to any directory, type ate and have it ignore that list of directories.
|