A small thing that’s been bugging me with TextWrangler and BBEdit is that the current directory in the Open File dialog doesn’t follow the directory of the current file.
In other words: First I’ll open and edit a file somewhere in a deep directory hierarchy. This is the main directory that I work in with this project. Now, I need to open a file from my Desktop. No problem, use the shorcut in the side panel of the Open File dialog. Then, I need to open another file from my main directory.
“Son of a — !”
I have no choice but to navigate back from the Desktop to the main directory, clicking on each directory on the way. Infuriating.
I used to use, in my Windows days, an Editor called EditPlus, which had a nice feature where the default directory of the Open File dialog followed the directory of the currently active file. So, from the previous example, if I wanted to open a file in my main project directory, I’d just select (in the editor) a file from that directory and press Cmd-O. Need another file from the Desktop? Select the file I just opened from the Desktop, press Cmd-O.
This Applescript adds the same functionality to TextWrangler. I think it should also work with BBEdit. [EDIT: It does.]
[EDIT: New version uploaded on 2012-10-21, see comments below.]