More on Mac Text Editors

While playing around with TextMate and skEdit and I’ve found a few features in each app that I really like.

skEdit

The code navigation menu is :guinness: brilliant :/guinness: ! Not only goes it have standard PHP function navigation built-in, but having a built-in system for extension is truly awesome. I generally use switch() statements in my procedural code and I was able to create entries for the switch()es and cases in a matter of minutes.

While this is great for working with existing code, I think I’m going to go one step further for future projects (and probably add this to existing projects over time) and standardize a comment prefix that I can use to indicate markers in comments directly in the code. Embedded data is always more portable.

BBEdit has a ‘markers’ feature too1, but I’ve found that sometimes the markers have trouble staying with the proper code (when things get moved around). Also, the markers in skEdit are built and updated dynamically from your code – no need to manually set the markers or worry about losing the file metadata.

TextMate

Code-folding… :guinness: brilliant :/guinness: ! This is the only feature I liked about HomeSite, but it was so dog slow in HomeSite 4-4.5 that I never really used it. I really like the ideas behind TextMate, but I’ve had trouble getting some of the add-on features to work as expected.

Back to BBEdit

I sent a bug/feature request to Bare Bones about a year ago asking for the ability to make option-arrow jump into words at an underscore the way it does at a hyphen. UltraEdit supports this by default and having spent a few years developing on PCs, I’d become accustomed to this behavior. I received a nice explanation for why this wouldn’t happen, and kinda forgot about the whole deal until about a week ago.

There has been a recent thread on the BBEdit mailing list discussing the ability to jump into camelCase words. Michael Tsai has a nifty AppleScript solution for this which I was able to hack into an script that jumps in at an underscore2.

All I did was change the isCapitalLetter function to check for an underscore instead:

on isCapitalLetter(c)
if c is equal to "_" then
return true
else
return false
end if
end isCapitalLetter

Very cool.

  1. Yes, I know I can generate markers from the code in BBEdit – but it doesn’t auto-update. [up]
  2. When I get sufficient ’round tuit’, I’ll probably try to fine tune this a little. [up]