MacOS – How to get Open File selector to show hidden files

applicationsfilesystemmacos

I would like my Open File selector to be showing hidden files. I am not sure if the same Open File module is shared among many applications that use it or each app has its own. The specific app I have in mind with which I would like to enable this functionality is Sublime Text 2. However, I do NOT want the Finder to be showing hidden files.

What I tried to do is execute

defaults write com.apple.Finder AppleShowAllFiles TRUE
killall Finder

from the Terminal but that changed it only in the Finder and not in the Open File selector for Sublime (exactly the opposite of what I was trying to accomplish).

Best Answer

You can use ⇧⌘. (shift-command-.) to show hidden files in a file dialog temporarily.

To make Sublime Text show hidden files by default, run:

defaults write com.sublimetext.2 AppleShowAllFiles -bool true

To show hidden files in all applications but not in Finder, run:

defaults write -g AppleShowAllFiles -bool true
defaults write com.apple.Finder AppleShowAllFiles -bool false

You can apply the changes by quitting and reopening applications. AppleShowAllFiles also affects other views besides file dialogs.