bbedit

How do you set the syntax coloring for a document?


In BBEdit how do you set the syntax coloring for a document that is unsaved and has no extension?


Solution

  • The language setting is in the status bar at the bottom of the editing view. For new untitled documents it says "(none)", click there to open a menu from which you can choose your desired language.

    If you always want a specific language for untitled documents, there is an expert preference, which you can set with this Terminal command (for example, setting it to Markdown):

    defaults write com.barebones.bbedit DefaultLanguageNameForNewDocuments -string "Markdown"

    In quotes instead of "Markdown" you can use the human-readable name of the language as it appears in the menu.