Wednesday, June 17, 2009

Notepad++: How to Associate Syntax Coloring for a File Extension

For the life of me, I could not figure out how to permanently associate the XML syntax coloring for files with a .config extension in Notepad++.

The help did not help, nor did the FAQs.

At any rate, this is how you do it:
  1. Settings Menu --> "Styler Configurator" (which then displays the "Style Configurator" window (note the discrepancy)).
  2. Click on "XML" in the Language list on the far left.
  3. Notice at the bottom there are two text boxes: Default ext and User ext.
  4. Enter config in the User ext text box.
  5. Click Save & Close.
  6. Open a file with .config extension - file should be automatically highlighted.
Here's a suggestion for Notepad++ developers (since it doesn't seem as if they have UX or Interaction Designers on the team)...

Help the user out by doing one of the following:
  • When an unrecognized file is opened ask what kind of file it is, or
  • When the user clicks on an entry in the Language menu, save it as the default for files with that extension.
Thanks!