Archive for the 'TextMate' Category

Textmate Search in a Folder (with grep) Part Deux

I posted my initial “Search in a Folder” solution a couple of days ago, and it turned out it had a few bugs (like the backgrounded ruby script never closing, and thus spawning a new ruby process for each time you loaded up the window. There were other user-experience annoyances, too. The good news is that that’s all in the past now.

The new version of the Wycats bundle has the following changes:

  • I am now using a utility window, so the search window always remains in front
  • I am now tracking open windows, so if you have an open window, another one doesn’t open
  • I track all available exit conditions and correctly exit the event loop
  • Other bugfixes and tweaks

Download version 1.0.1 today!

Proper Search in Directory

In August, I refactored a TextMate bundle to support Search within a folder via Grep. It was nice, but was fairly ugly, and non-configurable. Today, I’m releasing a (very alpha quality) version of a dialog that packages up grep within a directory into a nice GUI package (it looks a lot like Textmate’s default Search Within a Project dialog).

With this bundle, you can search within the entire project or any selected directory and get back the data in the bottom of the search pane, just like Textmate’s default search box. The bundle is activated by hitting Apple-Shift-F, but you can change it to whatever combination you like.

A couple of caveats

  • I don’t current block new windows from being created if one already exists. As a result, close your windows once you’re done with them.
  • Double-clicking a line in the bottom section of the dialog brings up the file with the caret on the line, as you expect. However, it hides the search window. Hit Apple-~ to get back to the search window. Hitting Apple-Shift-F will create a new window, so don’t do that.

Download the bundle today!

Search within a folder in Textmate

Ever wanted to search within a folder (or multiple folders) directly within Textmate? If you’ve ever tried doing full-project search, you know that it’s painfully slow. Thanks to Henrik Nyh, you can use grep instead of the built-in search, but his version only work on the full project. If you want, for example, to constrain your search to just the app folder in a Rails project, you’d have to make a new Textmate project, and search within there.

To simplify things, I expanded Henrik’s original work to support file contexts. If you select one or more folders in the project drawer, the search will be constrained to the selected contexts. If you select more than one context, the results for each context will be displayed sequentially, so you’ll see, for instance, all the results within the “app” folder and all the results within the “config” folder cleanly demarcated.

As with the original plugin by Henrik, this version does not support regular expressions, but it does return the results as clickable textmate URLs, which is nice. It also rebinds the apple-shift-f key, but you can easily change that if you want.

My updates are available as a bundle called “Wycats” — I hope to update this plugin to support regex as well as release additional useful items in the bundle.

Vibrant Ink Theme for TextMate

So the Vibrant Ink theme for Textmate has become a bit harder to track down lately due to some changes in EncyteMedia’s site structure.

Just to be helpful, you can download it from my blog