How to know which directory contains the file that I'm editing in TextEdit?
Hold down the Command or Ctrl key and click on the icon or file name in the center of the title bar of text edit's document window. 



Be sure to click on the title itself. The containing directory structure will be shown in reverse-hierarchical order.