Thursday, 19 April 2007
Ignoring folders with TODO Bundle in TextMate
TextMate's TODO bundle lets you keep track of the TODOs in your projects. You can mark a line to show up in the TODO list with FIXME, TODO or CHANGED. The following two images show a text file with these keywords and the resulting TODO list. The only problem is that if you keep a copy of Rails in vendor/, then the TODO plugin will also show the items in Rails (or any other external libraries and plugins you have in your project. This blog entry on exdolo.com describes how to get rid of the external items in your project with a sledgehammer: Add the vendor/rails folder to your global TextMate ignore list. However, there is a cleaner way: Open TextMate's Preferences Pane, go to Advanced » Shell Variables and the shell variable TM_TODO_IGNORE. You can set this variable to a regular expression as you would use it in Ruby (since the TODO bundle is written in Ruby). Et voilá: Rails-less TODO lists.