How to Modify Color Syntax in Notepad++

Learn how to easily change the syntax highlighting colors for any language in Notepad++

How to Modify Color Syntax in Notepad++

Released in 2003, Notepad++ has become one of the most popular Windows-based editors. With over 20 million downloads, fans of the editor love its simplicity and speed. Notepad++ comes complete with syntax highlighting for 78 different languages, a handy feature for coders. This article will show you how to modify the color syntax highlighting for any language. 

How to Modify Color Syntax in Notepad++

To change the color syntax (syntax highlighting) for your code in Notepad++, you must first check that you have the appropriate language selected. Click on “Language,” then locate and select your coding language. In our example, we are working with a Javascript file, so we ensured Notepad++ was set to “Language->J->Javascript.”

Notepad++ Language Select

Once you select the correct language, follow these steps to change the color syntax.

  1. Click Settings.
  2. Click Style Configurator.
    Notepad++ Style Configurator
  3. Under the Language column, select the language you are working with.
  4. Under the Style column, select the part of the syntax you would like to modify.
  5. Change your color under Colour Style.
    Notepad++ Style Configurator Menu

For example, if you don’t like the color of the strings in a Javascript file, you would go to Language: JavascriptStyle: STRING, and change the Foreground colour to whatever you like. 

Notepad++ Javascript String Color

The Style Configurator saves styles to the selected theme. You can change your theme at the top of the Style Configurator by clicking the “Select theme” dropdown and choosing a different theme. However, any style changes you made to the other theme will not be carried over.

Notepad++ Select Theme

How to Create Your Own Language Syntax Highlighting

Notepad++ allows you to define your own language if it doesn’t already support it. Follow these steps to create your own language:

  1. Click Language.
  2. Click User Defined Language.
  3. Click Define your language.
  4. Click on the Keywords Lists tab.
  5. Enter your keywords and styles.
Notepad++ Define Your Language

This screen has many color customization options, but the Keywords Lists are a great place to start.

How to Disable Syntax Highlighting 

To disable syntax highlighting, click on “Language” and then “None (Normal Text).” You can always change back to a specific language later if you like. 

Notepad++ Disable Syntax Highlighting

You now have everything you need to modify color syntax in notepad++, also known as syntax highlighting. If you like highly customizable editors, we recommend you check out Vim.

To get more coding walkthroughs, head over to our Coding Section.