View source from Firefox with TextMate
I figured I should briefly write up how to configure Firefox to view a page's HTML source using TextMate rather than the built-in Firefox source viewer, since googling it didn't turn up anything useful.
Instructions
Install the ViewSourceWith extension.
Restart Firefox to complete the installation.
Open the ViewSourceWith settings by going to Tools > Add-ons and double-clicking ViewSourceWith.
![[ViewSourceWith settings]](http://henrik.nyh.se/uploads/viewsourcewithtm-config.png)
On the "Main" tab of the settings, by the "Editor list", click "New".
In the pane that appears, input this:
Editor path: /usr/bin/open
Description: TextMate
Parameters: -a "TextMate" $f
![[ViewSourceWith editor pane]](http://henrik.nyh.se/uploads/viewsourcewithtm-configpane2.png)
If you installed the mate command line utility with TextMate, you could optionally do this instead:
Editor path: /usr/bin/mate
Description: TextMate
Parameters: $f
![[ViewSourceWith editor pane]](http://henrik.nyh.se/uploads/viewsourcewithtm-configpane.png)
Settting the editor path to /Applications/TextMate.app will, for whatever reason, open a new TextMate in the dock for every sourceview.
Confirm those settings.
If "Use in place of native message/page source menu item" is checked in the "Advanced" part of the settings, TextMate will replace the built-in source viewer. Otherwise, TextMate will be an option in View > Source With. You might need to restart Firefox for changes to this value to kick in.
![[ViewSourceWith advanced settings]](http://henrik.nyh.se/uploads/viewsourcewithtm-advanced.png)
All done!