Sunday, February 15, 2009

IMG_3779


IMG_3779
Originally uploaded by mrtonymccallie
Testing cross posting from flickr

Thursday, November 20, 2008

Deleting a line with a keyboard shortcut in TextWrangler

I love using TextWrangler for doing quick text editing from an FTP server, but I discovered that I hated not being able to delete a line. I normally use Eclipse for my dev work and have become addicted to using command-D to delete a line or several lines at a time. I googled around a bit and found anoved's suggestion on googlegroups and decided to implement it. It worked great! Here's a simple howto:

Open Applications->AppleScript->Script Editor

Paste this script into the new window:

tell application "TextWrangler"
    tell text of text document 1
        set a to startLine of selection
        set b to endLine of selection
        delete (lines a through b)
    end tell
end tell

Save the script as (home dir)>Library>Applications>TextWrangler>Scripts>delete_line

You can open TextWrangler and check the scripts menu and make sure that it exists and works.

Open System Preferences>Keyboard & Mouse>Keyboard Shortcuts

Hit the plus sign

Set the application to TextWrangler the menu title to "delete_line" and the keyboard shortcut to command-D

That's it!

Tuesday, July 24, 2007

CakePHP

I'm really into this CakePHP thing for developing. I have been a huge Typo3 fan for years and will always be (if not for the power of the thing, just for the man who started it and his "ministry" of code) CakePHP is a truly outstanding way to develop simple web apps in a hurry, but PROPERLY. I love the way the MVC theory is done. Once I found out about scaffolding and autobake.... I was sold. I realize that it is a copy of Ruby on Rails, so... mad props to those guys, but ruby isn't really an option for me. If you're a PHP developer and need structure, give it a look.