May | JUN | SEP
| 14 |
2005 | 2006 | 2007
10 captures 14 Jun 06 - 9 Oct 07 |
| Close Help

## TextMate: Insert text into self.down

on Tuesday, February 21, 2006

UPDATE: I got everything working and it's all packaged up here. There's an installation script this time as well.

Thanks to a helpful thread on the TextMate mailing list I have the beginning of a solution to insert text at 2 (or more) locations in a file.

I implemented this for a new snippet I was working on for migrations, `rename_column`. Since the command is the same in self.up and self.down simply doing a reverse search for `rename_column` in my hackish macro didn't return the cursor the desired location.

Read more...

Posted in textmate, rails, hacking | Tags commands, macro, rails, snippets, textmate | no comments | no trackbacks

## TextMate: Move selection to self.down

on Tuesday, February 21, 2006

UPDATE: This is obsolete, see this post for a better solution.

Duane's comment prompted me to think about how to get the `drop_table` and `remove_column` lines inserted in the right place. I don't think TextMate's snippets are built to do this sort of text manipulation. It would be nicer, but a quick hack will suffice for now.

Read more...

Posted in textmate, rails, hacking | Tags hack, macro, rails, textmate | no comments | no trackbacks

## TextMate Snippets for Rails Assertions

on Monday, February 20, 2006

This time I've got a few snippets for assertions. Using these to type up your tests quickly, and then hitting ⌘R to run the tests without leaving TextMate, makes testing your Rails app that much more convenient. Just when you thought it was already too easy! (Don't forget that you can use ⌥⌘↓ to move between your code and the corresponding test case.)

This time I'm posting the .plist files to make it easier for you to add them to TextMate. All you need to do is copy these to ~/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Snippets.

Assertion Snippets for Rails

If anyone would rather I list them all here I can do that as well. Just leave a comment.

(I wanted to include a droplet in the zip file that will copy the snippets to the right place, but my 3-hour attempt at writing the AppleScript to do so left me feeling quite bitter. Maybe I was just mistaken in thinking it would be easy to pick up AppleScript.)

Posted in textmate, rails, hacking | Tags rails, snippets, testing, textmate | no comments | no trackbacks

## Now these are desks!

on Monday, February 20, 2006

I will take one of these desks any day! I particularly like the "epic". But you know when you have to contact them to hear the price that's bad, bad news. Ah well, add it to the list of things to get once I have money.

Posted in life, hacking | Tags cool, hacking | no comments | no trackbacks

## Obligatory Post about Ruby on Rails

on Monday, February 20, 2006

I'm a Rails newbie and eager to learn. I welcome any suggestions or criticism you have. You can direct them to my inbox or leave me a comment below.

I finally set myself up with a blog. I mailed my dad the address and mentioned that it was running Typo, which is written in Ruby on Rails. The fact that it is written in Rails was a big factor in my decision. I am currently reading Agile Web Development With Rails and it will be great to use Typo as a learning tool, since I will be modifying my blog anyways regardless of what language it's written in.

Clearly Rails made an impression on me somehow or I wouldn't be investing this time on it. But my dad asked me a very good question:

> Rails? What is so special about it? I looked at your page and it looks pretty normal to me. I miss the point of this new Rails technique for web development.

It's unlikely that he was surprised at my lengthy response, but I was. I have been known to write him long messages on topics that interest me. However, I've only been learning Rails for two weeks or so. Could I possibly have so much to say about it already? Apparently I do.

Read more...

Posted in rails, hacking | Tags hacking, migration, rails, testing | 2 comments | no trackbacks

## Virtue

on Sunday, February 19, 2006

Man am I glad I saw Duane's post about Virtue. It's a virtual desktop manager for Mac OS X Tiger. Desktop Manager almost had it, but it didn't quite feel right to me. This app is exactly what I've been looking for in virtual desktops. It has bugs, but it mostly works.

My gentoo box has some serious competition now. Recently I feel like I spend more time developing on my Mac mini than my dual Opteron. I didn't expect that 5 months ago when I got the mini as my first Mac!

Posted in gentoo, mac os x, hacking | Tags macosx | 2 comments | no trackbacks

## syncPeople on Rails Bundle for TextMate

on Sunday, February 19, 2006

It's too fast I just can't keep up! :) Duane has posted a bundle with even more than go to view/controller. Now it has:

1. Open Controller / View — option-command-up
2. Create Partial from Selection — option-command-p
3. Intelligent Go To File — keypad 'enter' key

I'd love to see a central place for rails bundle development. We'll see what happens.

Posted in textmate, rails, amusement | Tags rails, textmate | no comments | no trackbacks

## Some TextMate snippets for Rails Migrations

on Saturday, February 18, 2006

My arsenal of snippets and macros in TextMate is building as I read through the rails canon, Agile Web Development... I'm only 150 pages in so I haven't had to add much so far because I started with the bundle found on the rails wiki. The main ones so far are for migrations.

Read more...

Posted in textmate, rails, hacking | Tags rails, snippets, textmate | 6 comments | no trackbacks

## Girlfriend X

on Saturday, February 18, 2006

This is hilarious! Someone wrote software that manages a "parallel" dating style.

> In addition to storing each woman's contact information and picture, the Girlfriend profiles include a Score Card where you track her sexual preferences, her menstrual cycles and how she styles her pubic hair.

It's called Girlfriend X, but that's a link to an article about it. I didn't go to the actual website. I just thing it's amusing someone went through the trouble to do this. Maybe there's a demand for it. * shrug *

Posted in amusement | Tags crazy, funny | no comments | no trackbacks

## Jump to view/controller in TextMate

on Saturday, February 18, 2006

Duane came up with a way to jump to the controller method for the view you're editing, or vice versa in TextMate while coding using Rails. This is a huge time-saver, thanks!

Posted in hacking, rails, textmate | Tags rails, textmate | no comments | no trackbacks

Older posts: 1 2 3

# sjs

##

◢◣