Rushmate
Rushmate attempts to make Textmate (macromates.com) custom command writing in ruby cleaner and smaller. It does this by leveraging rush (rush.heroku.com/).
Dependencies
-
Rush
Install
gem sources -a gems.github.com sudo gem install schlueter-rushmate
Sample
After installing rushmate. You would make a command in Textmate with the following text.
#!/usr/bin/env ruby require ‘rubygems’ require ‘rushmate’ Rushmate::Command.new
# find ruby files with the current word in textmate
found_files = project_directory["**/#{current_word.downcase.rb"]
if found_files.empty?
# if you can't find any files show a tool tip
exit.show_tool_tip("can't find #current_wordcurrent_word.downcase.rb in project")
else
# go ahead and switch to the found file(s)
found_files.mate
end
}
For more information on creating Textmate commands read manual.macromates.com/en/commands#commands.