TextMate automation

I keep learning ways in which TextMate enhance my productivity. It wasn’t until recently that I learned from Yon about the Shift-Apple-F search and replace in the whole project, and now I’m using it tens of times every day.

And today I created a command that executes the selection as a command in PostgreSQL in the database that I develop in, and shows the output as a tooltip. Extremely for executing a small query, CREATE TABLE, ALTER TABLE, or something like that.

The command goes like this:

psql -c "$TM_SELECTED_TEXT" --help $PG_DBNAME
(Actually, this is the slightly enhanced version after I discovered that TextMate already ships with one for MySQL.)

I also finally took the time to learn how snippets work, and start to get them integrated into my work routine. And I wrote one that’s quite handy for OpenACS work, triggered by redir TAB:

ad_returnredirect -message "$1" [export_vars -base "$2" { $3 }]
ad_script_abort

0 comments

There are no comments yet. Be the first one to leave a comment!

Leave a comment