Cascading indent filter/service

2008-02-07 08:08:00 UTC

When I respond to a user via email, I sometimes need to refer to a file or folder in the user’s file-system. Since users don’t ordinarily see path separators, I use a cascading-indent syntax:

    Home
        Library
            Application Support
                Adium
                    Users
                        Default

This works well, but typing all those tabs would be a good way to get RSI in my left hand. So, today, I finally wrote a Perl script to do it for me.

File: cascading-indent.pl.bz2

Of course, I use this script as a service, thanks to ThisService.

One downside to using it as a service is that you can’t directly use it in Mail. Mail inserts the contents of the general pasteboard (i.e., it pastes) rather than using the service-communication pasteboard. So I’ll need to trampoline through TextEdit for this to work. (This is on my list of bugs to file.)

UPDATE 2008-03-14: Apple fixed this bug in Mac OS X 10.5.2. So now you can invoke it directly from Mail—no trampolining needed.

UPDATE 2008-05-24: Never mind. It’s still broken. ☹

2 Responses to “Cascading indent filter/service”

  1. ssp Says:

    Why not use the script menu and make it place the text on the clipboard? Would certainly take less than the eternity Apple will need to change their line of code :)

  2. Peter Hosey Says:

    ssp: That’s a good idea. Quicksilver would work better than the Script menu, though.

Leave a Reply

Do not delete the second sentence.