After installing the TextMate editor I wanted all shell scripts (files ending with the
.sh extension) to open in TextMate. Unfortunately, selecting Open With -> Other… from the context menu, choosing an application, and then clicking the Always Open With checkbox doesn’t change the default application for all files with that extension, but rather only changes that specific file.
If you want to change the default application used to open all files with a specific extension, the steps are slightly different:
Select the file and choose File -> Get Info (or Cmd+i) and expand the Open With section:
From here, select the application you want to use for opening those file types and then click Change All. This will update the OS X Launch Services Database, which is consulted when opening files. Now all files with that extension will be opened with the application you selected.