Open as text option for every file, regardless of what OS X thinks of it [duplicate]

Solution 1:

You can add an action to the context menu to do this, with OS X's Services feature. Depending on your text editor (I'm pretty sure BBEdit offers this), there may already be pre-installed services available, you may just have to activate them.

To manage your services, open the Keyboard pane in System Preferences, and select Services from the left hand pane in the Keyboard Shortcuts section. You'll get a long list of services, each with a checkbox (to enable them), and the option to set a shortcut key. Check this list (probably in the Files and Folders section) for a service from your editor. If you find one, make sure the box is checked to enable it, and you should be able to access it in the context menu when you right-click a file (or a hotkey if you set one).

If you don't find a pre-made service, you can make one easily.

  • Open Automator, and select Service as the document type.
  • Change the options at the top to read "Service receives selected files or folders in any application" (change the last part to the Finder if you prefer).
  • Add the Open Finder Items action into your workflow, and change the Open with: drop down to your text editor.
  • Save, and it will prompt you for a name (which gets displayed in the menu). The actual service file gets saved in ~/Library/Application Support/ if you need to access it later.