How to make html files open in TextWrangler from your browser

Hello.

Occassionally, it is convenient to be able to edit html pages that are on disk. I was looking for a way to this, and I found the way in Google Groups for TextWrangler.

The thing is, is that TextWranglers, or BBEdits uri handler, only brings the respective app to front, but, if you use Text Mate’s protocol, then it works. You may want to use RCDefault app, to set up the default receipient of the protocol, if you have several apps installed, since the txtmt protocol will work with the latest app of TextWrangler, BBEdit and TextMate.

I have used ~/.bashrc as the file to open in the demo below, but it should really work with any text file, provided it exists of course! By the way: During the process of making this to work, i found out that the webpagehelper app over at MacOsXAutomation still works under Mavericks. I thought it didn’t, probably because I didn’t respect the format of the protocol for the URI’s, namely following the structure of the passing of the file as seen below.

Hello.

Here is a bookmark that lets you open a file url from 'Safari into TextWrangler. The full path of a file must not contain any spaces, or it won’t work, whether any spaces are real spaces, or encoded as %20.

You must first make a new dummy bookmark on your favourite bar, and then paste the snippet below in as its address, and then rename it to TW or simiiar. -You get to the bookmars by choosing Edit Bookmarks on the Bookmarks menu, and the choices for editing is on the contextual menu.

NB!

If you have installed TextMate, or BBEdit after TextWrangler, then the file will open in the last installed, (they share the same protocol). You can always adjust what app to open the protocol with (among those 3), by using RCDefaults.app.