19 August 2009 5 Comments

Textmate and SVN

The shift was overdue. Although Coda, my dev app of choice, offers everything a hobbyist programmer would need, it fails miserably on one aspect. Namely, code folding. For a long time, this trade-off seemed to still justify the use of this app for day-to-day development needs, in light of its other features, e.g. easy integration with SVN, about which I have written in the past.

However, of late as I start to work with larger projects with a lot of embedded logic, and process flows, it has become a pain in the proverbial behind to switch from Coda to an app that will fold code. The forums and blogs are abuzz with developers’ dissatisfaction with the lack of Code folding, and the staff at Coda don’t seem to care. If only I could configure SVN with TextMate, and that too in a comprehensive, intuitive way, I could move away from Coda, forever. It seemed to be a pipe dream, i.e. till now. I have successfully set up SVN with TextMate and in a way that mirrors the ease of COMMIT, REVERT, DIFF found in Coda. Here’s a how-to.

This is what you’ll need at the get go.

  1. TextMate editor (of course)
  2. SVN Frontend (if you don’t want to finagle with the terminal). I use CornerStone.
  3. FileMerge (from XCode dev tools – recommended) or Changes.
  4. SVNMate Plugin for TextMate.
  5. FileMerge Plugin for TextMate.

Create a SVN repository with the software of your choice. I usually create one on an external drive (as I need access to my code offline from time to time). Note down the local or remote URL. In my case it is

file:///Volumes/ExternalHDD/CodeRepo/MyProj/.

Double click the SVNMate.tmbundle file, and it will insitall itself in your

~/Library/Application Support/Textmate/Bundles/.

Do the same for the FileMerge Plugin as well. Now is the time to configure. Open a blank file with Textmate and in the Bundles Menu

Bundles->Subversion->CheckOut.

Enter the local or remote SVN URL, and choose a folder in which you’d like to check out the files. That was easy. At this point you are pretty much set with SVN on TextMate. You will see icons displayed next to the files in the file browser, indicating their subversion status. That’s the beauty of the SVNMate plugin we just installed. Any changes you make to your files will alter the icon status to signify changed content. You can fire up the commands using CTRL-SHIFT-A to bring up SVN commands. But – you could make your life easier by setting up the following options as well. This is a matter of choice of course.

Changing the default icons for SVNMate
Change the default SVN status icons by going to TextMate preferences. Preferences->SVNMate and choose a set that catches your fancy.

Using FileMerge
Instead of using the TextMate SVN diff file viewer to see the changes since the last commit, use FileMerge. It is included in XCode developer tools, and is perhaps the best viewer, with split side-by-side views.

Use Tab Triggers in TextMate
Perhaps the BEST feature so far – use TextMate tab triggers to trigger SVN events. Tab Triggers are used in TextMate by assigning a set of letters followed by a TAB key press, to trigger an associated event. You can pretty much do anything you like with Tab Triggers, from inserting pieces of Code in TextMate to SVN file commits. To set up a Trigger for an SVN Commit, go to Bundles->Bundles Editor->Commands. Choose Subversion from the list. Choose a command from the list, and in the right pane choose a method of Activation from the Drop down – Tab Trigger. To it, assign any combination of words. I chose “commitsource” for COMMIT.

If you prefer to view the differences in FileMerge instead of the inbuilt diff viewer, in the same window (Bundle Editor) choose FileMerge in the list and edit the Revision Command.

Voila, it just works. To see the new Tab Triggers at work, type the keyword inline with the code, and press Tab.

Don’t worry, the keyword disappears from the code as soon as you close the FileMerge (or the associated app window). Simply wunderbar.

So indeed, it is time to move to TextMate and stop bemoaning the lack of Code Folding.


25 July 2009 0 Comments

iPhone 3GS – Week 4 and all is Great!

Week 4, and the iPhone 3GS is chugging away like a champ. Having upgraded from a 1G 4GB iPhone to this beast, I am continually impressed by its speed, features, capabilities and the vast array of possibilities.

Initially I resisted the temptation to Jailbreak my iPhone. I figured Jailbreak is just a step to get to the Unlock. Since I am on AT&T, I didn’t need that. However, seeing how Apple chose to cripple the phone (vis-a-vis no HD videos on Youtube on 3G, or Skype calls etc), I reluctantly took the leap. I have not regretted that. With step by step instructions from iClarified, it was a snap. No need to reload the firmware, just a couple of steps and there’s Cydia! I am a happy camper.

The phone cam and video quality is a huge step up from the previous generation iPhones. I increasingly find myself leaving home without my point and shoot of late. It is just so much easier to whip out my iPhone and take a video of my cute little nephew being ever so cute on a whim. I wish there were an option to upload the HQ video to Youtube directly from the iPhone instead of the scaled down version. Oh well. Maybe there’s an app for that ; ) .

This phone has well and truly rekindled my desire to develop apps for the iPhone. The SDK is rather straightforward and allows the developers to tap into the various features with ease. More on that as it develops.

And here’s an obligatory graphic – this time an image I like to call “Impressions of Suburbia”. Snapped with my 3GS, and manipulated with ColorSplash. All on the iPhone.

q


Tags: , ,
14 June 2009 0 Comments

Back from Disney

After a week of intense fun and excitement at the Walt Disney World in FL, we are back home, and are certainly feeling the Disney Withdrawal Syndrome. A skeptic to begin with, I ventured forth a week back, not knowing what to expect. Conscious of the Disney brand and the fact that we were being subjected to Disney marketing etc, I was wary of becoming a “tool” in the ploy.

But Disney World won me over. It was tremendous fun – the rides, the ambience, the people (tens of thousands of people), the musicals, the shows, the characters, the staff, and the attention to detail. And then there were the resort facilities – pools, tennis, spas, etc. The week just flew by. And now we find ourselves back at home, longing to be back at Disney, to take the bus to one of the four parks, and enjoy rides such as Splash Mountain, Rock n Roller Coaster, The Tower, and so on. What a magical time it was indeed. Can’t wait till the next time. More pictures to follow soon.
But now it is time to get back to the real world. Have a magical day y’all.


Tags: , ,