14 December 2015

setup TextEdit to save HTML files

: : for TextEdit on mac : :

from Chris Thomson on Quora ...

There isn't any way to set the default extension for files in TextEdit -- you'll always have to type .html at the end of the filename manually. I'd highly recommend using an alternative text editor for editing any sort of code files (see What is the best text editor for writing HTML and CSS?), but if you must use TextEdit, here's a few tips to make it as painless as possible to save HTML, CSS, and other code files constantly:
  • Set the default filetype to plain text. You cannot save code files when you're in Rich Text format. Open up TextEdit, and go to the TextEdit menu and select Preferences, then change the Format option to Plain Text. If you ever need to save a file as rich text, you can change that on a per-document basis using the Format menu.
  • Tell TextEdit not to automatically add the .txt extension to plain text files. In TextEdit preferences, go to the Open and Save tab, and uncheck the Add ".txt" extension to plain text files option.