I was using the new Rails Source Code Annotations when I first started construction on this blog, but it quickly started falling short with comments in javascript files and also in HAML views.

// application.js
function someFunction() {
 // FIXME: This will not show with rake notes

// someview.html.haml
// TODO: Same style of comments does not show here either
%h1 ...

I was about to start diving into tracking down and modifying the rake task to account for these exceptions when I recalled hitting control-shift-T (find annotations in current project) when I was meaning to hit command-shift-T (jump to method in current file) in Textmate and seeing a TODO list start to generate.

Textmate annotations when no filtering is done

The issue though was that the annotations list would take far to long to generate, and would be so full of irrelevant TODOs, FIXMEs, and CHANGES from the vendor/plugins directory (I include this but not vendor/rails in my Textmate alias).

Show The Package Contents on the Textmate Application

Turns out there is a TM_TODO_IGNORE environment variable in the TODO bundle script that you can use to filter out files and directories that it searches.

# todo.rb inside of Contents/SharedSupport/Bundles
# ...
ignores = ENV['TM_TODO_IGNORE']
# ...
TextMate.each_text_file do |file|
  next if (ignores != nil and file =~ /#{ignores}/) or File.symlink?(file)
#  ...
# ...

File, Preferences, Advanced, Shell Variables


The result of setting this environment variable is manageable project annotations along with the benefit of clickable annotations that bring you to that exact spot in the source file.

Textmate annotations when filtering is done

Yes, I run the Halloween theme all the time :)