How to completely disable syntax higlighting in Notepad++

12,068

I'm not sure why commenting out the relevant sections did not work - was Notepad++ closed when you did that?

An alternative method is to disable the language from within Notepad++ and then add a user defined language assigned to the java extension.

  1. Go to Settings > Preferences > Language Menu/Tab Settings.

  2. Select Java on the Available items list.

  3. Click the arrow to add it to the Disabled items list.

    Screenshot of settings
    Click for full size

  4. Go to View > User-Defined Dialogue....

  5. Create New..., name it whatever you like. I named it Java_normal.

  6. Add java to the Ext. textbox.

    Screenshot of dialogue
    Click for full size

  7. Close the User Defined Language window.

  8. Restarting Notepad++ may be necessary.

Share:
12,068

Related videos on Youtube

danirod
Author by

danirod

Updated on September 18, 2022

Comments

  • danirod
    danirod over 1 year

    I'm unable to completely disable syntax highlighting for Java source code files in Notepad++.

    I've commented out the Java sections in langs.model.xml and stylers.model.xml (even tried deleting those files to no avail) but if I create a new file and then save a file with .java extension then, bang! syntax colouring kicks in. Grrrrr. any way to do this?

    You might think it's an absurd requirement but I'm preparing a Java certification and it's better to practise programming with no syntax help at all but I still like to use Notepad++ because I'm used to it and for its other features (multi-tabbed interface, reopen last used files... etc) instead of crappy plain old win notepad.

    Thanx

  • danirod
    danirod almost 12 years
    Already done that, it doesn't help. As I understand it this preference modification just removes it from the interface, that is, Java disappears from the "Language" menu which lists available languages but not from the program "internals". If you create a new file and save it with .java ext it will still colourize it.
  • tvdo
    tvdo almost 12 years
    @b4nd0ler0 Updated, this one should work. The user defined language with no highlighting should override the built in one - and I've actually tested making a new/saving/opening a .java file. There's more details at the official wiki, here.
  • Royi
    Royi over 6 years
    What about just setting the current document to normal text mode?
  • tvdo
    tvdo over 6 years
    @Royi The question asked about Java source in general, so having to change the language every time you open a file is probably not great.
  • Royi
    Royi over 6 years
    I meant I have regular text in Notepad++. By mistake I set the language to, let say C. I now want to go back to text only mode (Not Syntax Highlighting), How can I do that?
  • tvdo
    tvdo over 6 years
    @Royi Could you not just reopen the file? Anyway, you're probably better off asking a new question - I've not used Notepad++ in years.
  • Royi
    Royi over 6 years
    What if it is not a saved file (Just started writing)?