Sublime Forum

Why codes are not showing colors?


New to sublime text.

I’m wondering why the codes are not showing colors? I’m using Mac.



Syntax highlighting depends on the type of file that you’re editing, so unless you tell it what sort of file you’re editing, Sublime assumes it’s just a text file.

You can do one of the following:

  1. Save the file; once it’s saved, Sublime will know what type of file it is and syntax highlight it.
  2. Open the command palette and enter setsyn to filter to all of the Set Syntax: commands, then pick the one that represents the type of file that you’re working with
  3. Navigate to View > Syntax in the menu and then select from the list the type of file you’re editing.
  4. In the bottom right of the window, the status bar tells you what kind of file Sublime thinks you’re editing (it probably says Plain text). If you click there, you’ll get the same menu as from #3 above; pick the appropriate file type from the list.


Thank you! It works now.

Another question is that how do I see the outputs?



To run a program, use Tools > Build from the menu (or the associated key). That will trigger Sublime to try and build the current file. What that does depends on the type of file you’re editing and what the build system is set to under Tools > Build System.

I would recommend setting it to Automatic, which will make Sublime automatically choose the correct build (if there’s more than one that applies, it will ask you to pick from the valid builds the first time you do this).

More information on the basics of build systems, how they work and how to use them can be found in this video series:

1 Like


thank for your help!