10.4: Use Automator to view any file in a text editor

Aug 16, '05 08:53:00AM

Contributed by: robg

Tiger only hintIf you download a text file from the internet, like a ReadMe or a .nfo file, it usually doesn't open in TextEdit unless you explicitly tell the Finder to do so for each and every file you download. You can use the 'Open With' contextual menu, of course, but this menu usually includes a lot of options for generic text files -- so it takes a while to display, and then to scroll through to find TextEdit. You can also, of course, help the Finder learn about each type of generic text file you may download (by using Get Info and changing the default application), but this can be tedious and you may not actually wish to change the default application.

The solution is to create a simple Automator action to open the currently selected file(s) in TextEdit, and install it as a Finder plug-in:

  1. Launch Automator and click on Finder in the Library column.
  2. In the Action column, drag Open Finder Items to the empty area on the right-hand side.
  3. In the Action itself, click the Open with pop-up and set it to TextEdit (or the text editor of your choice).
  4. Select File: Save as Plug-in.
  5. In the dialog that appears, enter the name you want to give to the plugin (eg. View in TextEdit) in the 'Save Plug-in As' field, and set the 'Plug-in for' pop-up to Finder.
  6. Click the Save button.
From now on, you can select any file or files you want to view, control-click on one of them, and select the option View in TextEdit (or whatever name you used) from the Automator sub-menu. This is much quicker than using the Finder's huge Open With menu.

Note: This hint was originally submitted by an anonymous contributor, with a link to a downloadable action. However, the link was broken, and there was no contact information included with the submission, so I couldn't contact the author. I thought the concept sounded useful, however, so I played with Automator for a couple minutes to create my own version of the action. So thanks to the submitter, whomever you were, for the idea to create this simple plug-in.

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050809144212689