TextMate Tip #2 (Blocks)
Working with Blocks in Ruby in Textmate.
TextMate Tip Episode 2 (Blocks) from Derek Neighbors on Vimeo.
More from Derek Neighbors
- TextMate Tip #3 (Don’t Leave The Editor)
- TextMate Tip #5 (Counting Iterators)
- TextMate Tip #4 (rDoc)
- TextMate Tip #6 (Declarations)
- TextMate Tip #7 (Declarations Continued)
You Might Also Be Interested In
- Rules of Sales: Rule #2 (Chris Conrey)
- WordPress 2.0 (Brainfuel)
- Picasa 2 Review (Brainfuel)
Comments (5)
















![Recommend [dneighbors]](http://s3.amazonaws.com/arkayne-media/img/badge/logo-recommend-badge-small.png)
[...] TextMate Tip #2 (Blocks) [...]
The “block toggle” is new to me; very nice.
On a related note is ^: (control-shift-colon) for toggling a “word” between string and symbol.
Thanks.
One note on this, in order for the toggle to work when going from a {|x| …} block to the do … end block the code must be on a single line.
For example:
respond_to { |format| format.html … }
will toggle appropriately but
respond_to { |format|
format.html …
}
will not. I know, why would you do the short hand version on multiple lines but I have seen it done. Anyway, thanks for the tips. I have learned some new tricks already and I can’t wait to see what else you have to uncover.
I am new on Mac and for me the “ctrl +{” freezes Textmate, takes up about one minute to execute. Does somebody have an idea ?
I found the problem. In my bash_profile there was an access to a external resource which was taking time to execute. It seem that that code snippet uses an external script.