When working in TextMate, if you have a one or more lines of Ruby code that you would like to have the interpreter run, without the need for passing the entire file to the interpreter, this tip may be just what the doctor ordered.
For example, when debugging, often times it would be really handy to run a simple script at a specified location in your code to look at a value, call a method on an Object… The key point here is that you can have as little as one line of Ruby processed by the interpreter and the return value will be inserted inline.
This easiest way to get the gist of this is to watch the screencast below:
If you want to insert the results of one or more lines of script, directly into your code, using # => markers is the way to go.
The music in the video is J.J. Cale and the song: Call Me the Breeze.
A longer clip of J.J. Cale jamming:
Click the image to see more about about JJ and the CD (at Amazon)
This post is one in a series demonstrating a very intriguing application for creating screencasts, ScreenFlow. If you are currently creating screencasts on a Mac, or have considered doing so, you definitely need to give this a look.
In this post I will create three short screencasts, all created using ScreenFlow. The first will be a simple demonstration of a coding trick which is handy when working with column blocks in TextMate. The second will show how to make various modifications to the first video from within ScreenFlow, and the final will show the end result.
When watching the first video, understand that we haven’t done any editing as of yet, so the code/text is rather hard to read. This is even more pronounced in the second video where I demonstrate ScreenFlow to capture a video showing various editing features of ScreenFlow (it’s not as confusing as it sounds). Stick with me on this and I’ll make it right (click the image below to watch the first video)..
Now that we’ve captured the demonstration of the TextMate trick, we need to dive into some of the editing features of ScreenFlow to make the text more readable (click the image below to watch the video):
And with the changes complete, we can now see the final result (you know the drill):
Join me in the next post where I’ll demonstrate some additional features of ScreenFlow including how to record video separately from audio. If you’ve ever created a screencast, you’ll truly appreciate this feature!
As a huge fan of TextMate and always one on the lookout for new bundles, I want to pass on interesting DOM Assistant bundle developed by Roger Johansson over at 456 Berea Street.